How to convert pandas dataframe into list?


I have a data frame in pandas. I want to convert this data frame into a list. How can I do that?

1 Answer

4 years ago by

To convert a data frame into a list, first we need to convert the data frame into an array then to a list like below

dataframe.values.tolist()
4 years ago by Divya