How to show all of columns name on pandas dataframe?

后端 未结 13 2177
既然无缘
既然无缘 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条回答
  •  情书的邮戳
    2020-12-07 08:57

    A quick and dirty solution would be to convert it to a string

    print('\t'.join(data_all2.columns))
    

    would cause all of them to be printed out separated by tabs Of course, do note that with 102 names, all of them rather long, this will be a bit hard to read through

提交回复
热议问题