Created
August 21, 2016 20:11
-
-
Save linlincheng/c09d997df1bdcfaab818bd185972f2f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#save new_list, a list of dictionaries to a csv file: | |
keys = tmp_list[0].keys() | |
with open("event_list.csv", "w") as f: | |
dict_writer = DictWriter(f, keys, delimiter=",") | |
dict_writer.writeheader() | |
for value in tmp_list: | |
dict_writer.writerow(value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment