From 8370bffdbbe212dbb90976faad18a46d4accd9f1 Mon Sep 17 00:00:00 2001 From: Yorusora <yorusorank@outlook.com> Date: Tue, 14 Jan 2025 23:57:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPSG=5Flabel=5F2=5FBCG=5Flabel?= =?UTF-8?q?.py=E8=84=9A=E6=9C=AC=E4=B8=AD=E7=9A=84=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=85=B3=E4=BA=8E=E8=B7=AF=E5=BE=84=E7=9A=84=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PSG_label_2_BCG_label.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PSG_label_2_BCG_label.py b/PSG_label_2_BCG_label.py index 46c7750..8c6da9f 100644 --- a/PSG_label_2_BCG_label.py +++ b/PSG_label_2_BCG_label.py @@ -9,8 +9,7 @@ def get_time_to_seconds(time_str): base_event = ["Hypopnea", "Central apnea", "Obstructive apnea", "Mixed apnea"] # 输入设置(每次运行此脚本都必须检查) -dir_path = Path(r"E:\data_annotation\6SleepApnea_annotation_GUI_demo\data") - +dir_path = Path(r"D:\code\data") PSG_Data_Path = dir_path / "PSG" PSG_Label_Path = dir_path / "PSG_label" BCG_Data_Path = dir_path / "BCG" @@ -37,7 +36,7 @@ for sampID in sampIDs: df_PSG_label['End'] = df_PSG_label['Start'] + df_PSG_label['Duration'].astype(float).round(0).astype(int) # 写入csv文件 - df_PSG_label.to_csv(dir_path.name + r"\BCG_label\export" + str(sampID) + "_all.csv", index=False, encoding="gbk") + df_PSG_label.to_csv(str(dir_path) + r"\BCG_label\export" + str(sampID) + "_all.csv", index=False, encoding="gbk") # 打印结果 print("sampID_" + str(sampID) + "写入csv成功") \ No newline at end of file