convert dataframe in pandas to dictioanry code example Example: pandas to dictionary df.to_dict('records')