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