python create json object from dataframe code example
Example: convert dataframe to json
dictionary_varibale = [
dict([
(colname, row[i])
for i,colname in enumerate(df.columns)
])
for row in df.values
]
print(json.dumps(dictionary_varibale))