go from pandas dataframe back to dictionary code example Example: pandas to dictionary df.to_dict('records')