python dataframe tolist code example
Example 1: pandas series to list
lst = data.tolist() # data is pandas series
Example 2: dataframe to list
df.values.tolist()
lst = data.tolist() # data is pandas series
df.values.tolist()