convert three column to a dictionary pandas code example
Example 1: pandas to dictionary
df.to_dict('records')
Example 2: convert pandas group to dict
res = dict(tuple(d.groupby('a')))
df.to_dict('records')
res = dict(tuple(d.groupby('a')))