From 9743101d49c78283c24afe628e8e6b0651cf8dc0 Mon Sep 17 00:00:00 2001 From: pgvxkfc79 <2858209755@qq.com> Date: Thu, 28 Apr 2022 09:14:50 +0800 Subject: [PATCH] Update getdata.py --- getdata.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/getdata.py b/getdata.py index 32e5820..b1cec63 100644 --- a/getdata.py +++ b/getdata.py @@ -80,4 +80,15 @@ NUM = 0 date += date1 x += 1 i = 0 - name2 = name1[0].split() \ No newline at end of file + name2 = name1[0].split() + while i < numname: + name += name2 + i += 1 +num = range(0, Num) +rows = zip(num, name, date, date, time, through) +with open("test.csv", "w", encoding='utf-8', newline="") as t: + writer = csv.writer(t) + writer.writerow(["", "病例", "开始日期", "结束日期", "时间", "事件"]) + for row in rows: + writer.writerow(row) +t.close() \ No newline at end of file