covid/headers.py

27 lines
491 B
Python
Raw Normal View History

2020-07-31 10:27:48 -07:00
import os
import csv
basedir = "COVID-19/csse_covid_19_data/csse_covid_19_daily_reports_us"
headers = []
for fname in os.listdir(basedir):
fpath = os.path.join(basedir, fname)
with open(fpath) as f:
c = csv.reader(f)
for row in c:
headers.append(set(row))
break
for headerset in headers:
for other in headers:
if headerset != other:
print(headerset)
print(other)
print("ok")
print(list(headers[0]))