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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *