my tools for viewing covid data
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
491 B

  1. import os
  2. import csv
  3. basedir = "COVID-19/csse_covid_19_data/csse_covid_19_daily_reports_us"
  4. headers = []
  5. for fname in os.listdir(basedir):
  6. fpath = os.path.join(basedir, fname)
  7. with open(fpath) as f:
  8. c = csv.reader(f)
  9. for row in c:
  10. headers.append(set(row))
  11. break
  12. for headerset in headers:
  13. for other in headers:
  14. if headerset != other:
  15. print(headerset)
  16. print(other)
  17. print("ok")
  18. print(list(headers[0]))