human
Pandas DataFrame to List of Dictionaries
assistant
Here is some code to create list of dictionaries from pandas dataframe `df`

df.to_dict('records')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.