dict to dataframe with keys as columns code example
Example 1: convert dict to dataframe
#Lazy way to convert json dict to df
pd.DataFrame.from_dict(data, orient='index').T
Example 2: convert pandas dataframe to dict with a column as key
df.set_index('columnName').T.to_dict()