Created
October 19, 2011 03:57
-
-
Save dacc/1297445 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
import os, json, csv | |
os.chdir("/Users/dcarleton/workspace/upload") | |
jsons = filter(lambda f: f.endswith(".json"), os.listdir(".")) | |
for file in jsons: | |
j = json.load(open(file)) | |
csv_file = open(file + ".csv", "w") | |
c = csv.writer(csv_file) | |
for r in j: | |
c.writerow(r.values()) | |
csv_file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment