how to convert pandas series to a dict code example Example: pandas to dictionary df.to_dict('records')