pandas à json
>>> df.to_json(orient='records')
'[{"col 1":"a","col 2":"b"},{"col 1":"c","col 2":"d"}]'
Crazy Caterpillar
>>> df.to_json(orient='records')
'[{"col 1":"a","col 2":"b"},{"col 1":"c","col 2":"d"}]'
df = pd.json_normalize(json data)
dataframe = pd.DataFrame.from_dict(a_json, orient="index")
dictionary_varibale = [
dict([
(colname, row[i])
for i,colname in enumerate(df.columns)
])
for row in df.values
]
print(json.dumps(dictionary_varibale))