I'm new to python and I have a json file that I'm trying to use to create a data structure using python.
Here is a sample of what one of the lines would look like:
[{'name': 'Nick', 'age': '35', 'city': 'New York'}...]
I read it into memory, but am unsure what additional steps I would need to take to use it to create a table.
Here is what I have tried so far:
import json
import csv
from pprint import pprint
with open("/desktop/customer_records.json") as customer_records:
data=json.load(customer_records)
for row in data:
print(row)
Ideally, I would it in the following format:
Name Age City
Nick 35 New York
Any help would be appreciated. Thanks in advance.