Skip to content

Instantly share code, notes, and snippets.

@sreevardhanreddi
Created March 6, 2019 17:16
Show Gist options
  • Save sreevardhanreddi/7b81ae69fd5c1f45f6ad65d023bea898 to your computer and use it in GitHub Desktop.
Save sreevardhanreddi/7b81ae69fd5c1f45f6ad65d023bea898 to your computer and use it in GitHub Desktop.
temp = []
with open('JSON_TO_CSV_2019-01-30-18-56-22-101458.csv') as f:
r = csv.reader(f)
head = next(r)
for i in r:
dict_ ={}
for j,k in zip(head,i):
dict_[j]=k
temp.append(dict_)
dict_ = {}
#instead of appending to temp, process it on the fly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment