Created
October 7, 2015 11:55
-
-
Save lmorillas/cc02216a056bdbbaa231 to your computer and use it in GitHub Desktop.
Tabla a json con python
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
# convierto la tabla a csv con phpmyadmin | |
from csv import DictReader | |
import json | |
f = open('materiales.csv') | |
reader = DictReader(f, delimiter=';') | |
result = [line for line in reader] | |
json.dump(result, open('materiales.json', 'w')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment