Skip to content

Instantly share code, notes, and snippets.

@varunity
Created April 27, 2015 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save varunity/571239e6df7240210d26 to your computer and use it in GitHub Desktop.
Save varunity/571239e6df7240210d26 to your computer and use it in GitHub Desktop.
import csv
import json
with open('data.json') as data_file:
x = json.load(data_file)
f = csv.writer(open("20150425.csv", "wb+"))
# Optional CSV Header - uncomment if needed
#f.writerow(["name", "creditcard"])
for z in x:
f.writerow([z["name"],
z["creditcard"]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment