Categories
Python Answers

How to get a list from Python Pandas DataFrame column headers?

Spread the love

To get a list from Python Pandas DataFrame column headers, we call list on the data frame.

For instance, we write

list(my_dataframe)

where my_dataframe is a data frame to return a list.

Leave a Reply

Your email address will not be published.

If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.