Last active
December 14, 2015 06:18
-
-
Save jbspeakr/5041029 to your computer and use it in GitHub Desktop.
Check http://www.datahack.it for further conversion snippets!
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 | |
import json | |
i = open('input.csv', 'r') | |
reader = csv.DictReader(i) | |
data = json.dumps([row for row in reader], indent=4) | |
o = open('output.json', 'w') | |
o.write(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment