Last active
December 25, 2015 09:49
-
-
Save israelst/6957253 to your computer and use it in GitHub Desktop.
From csv to json in one twitt
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 csv, json | |
f = open('sample.csv', 'r') | |
reader = csv.DictReader(f, fieldnames=("col1","col2")) | |
print json.dumps(list(reader)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment