How to show all of columns name on pandas dataframe?

后端 未结 13 2143
既然无缘
既然无缘 2020-12-07 08:24

I have a dataframe that consist of hundreds of columns, and I need to see all column names.

What I did:

In[37]:
data_all2.columns

T

13条回答
  •  萌比男神i
    2020-12-07 08:39

    I had lots of duplicate column names, and once I ran

    df = df.loc[:,~df.columns.duplicated()]
    

    I was able to see the full list of columns

    Credit: https://stackoverflow.com/a/40435354/5846417

提交回复
热议问题