|
|
@ -48,7 +48,7 @@ time = []
|
|
|
|
through = []
|
|
|
|
through = []
|
|
|
|
Num = 0
|
|
|
|
Num = 0
|
|
|
|
for i in result:
|
|
|
|
for i in result:
|
|
|
|
NUM = 0
|
|
|
|
NUM = 0
|
|
|
|
f = open('20.txt', 'w', encoding="utf-8")
|
|
|
|
f = open('20.txt', 'w', encoding="utf-8")
|
|
|
|
f.write(i)
|
|
|
|
f.write(i)
|
|
|
|
f.close()
|
|
|
|
f.close()
|
|
|
@ -62,7 +62,6 @@ for i in result:
|
|
|
|
f = open('10.txt', 'w', encoding="utf-8")
|
|
|
|
f = open('10.txt', 'w', encoding="utf-8")
|
|
|
|
f.write(i)
|
|
|
|
f.write(i)
|
|
|
|
f.close()
|
|
|
|
f.close()
|
|
|
|
data = openreadtxt("10.txt")
|
|
|
|
|
|
|
|
data = str(data)
|
|
|
|
data = str(data)
|
|
|
|
date1 = re.findall("\d{1,2}月\d{1,2}日+(?=,)", data)[0]
|
|
|
|
date1 = re.findall("\d{1,2}月\d{1,2}日+(?=,)", data)[0]
|
|
|
|
date1 = date1.split()
|
|
|
|
date1 = date1.split()
|
|
|
@ -85,11 +84,11 @@ for i in result:
|
|
|
|
while i < numname:
|
|
|
|
while i < numname:
|
|
|
|
name += name2
|
|
|
|
name += name2
|
|
|
|
i += 1
|
|
|
|
i += 1
|
|
|
|
num = range(0, Num)
|
|
|
|
num = range(0, Num)
|
|
|
|
rows = zip(num, name, date, date, time, through)
|
|
|
|
rows = zip(num, name, date, date, time, through)
|
|
|
|
with open("test.csv", "w", encoding='utf-8', newline="") as t:
|
|
|
|
with open("test.csv", "w", encoding='utf-8', newline="") as t:
|
|
|
|
writer = csv.writer(t)
|
|
|
|
writer = csv.writer(t)
|
|
|
|
writer.writerow(["", "病例", "开始日期", "结束日期", "时间", "事件"])
|
|
|
|
writer.writerow(["", "病例", "开始日期", "结束日期", "时间", "事件"])
|
|
|
|
for row in rows:
|
|
|
|
for row in rows:
|
|
|
|
writer.writerow(row)
|
|
|
|
writer.writerow(row)
|
|
|
|
t.close()
|
|
|
|
t.close()
|
|
|
|