conver t data frame tp dict code example
Example 1: dataframe to dict without index
df.to_dict('index')
Example 2: dataframe to dictionary using index as key
#Use the Dataframe index as the key of the dictionary
df.to_dict('index')
df.to_dict('index')
#Use the Dataframe index as the key of the dictionary
df.to_dict('index')