Pandas - remove the label of the column index

前端 未结 5 2185
遇见更好的自我
遇见更好的自我 2021-02-12 22:47

I have a dataframe as follows:

PLEASE_REMOVE  2013  2014  2015
 THIS_IS_EASY
-------------------------------
          Bob     0     3     4
         Mary     2          


        
5条回答
  •  南笙
    南笙 (楼主)
    2021-02-12 23:15

    In Pandas 1.0.3 I have used the following :

    df.rename_axis(None, axis = 1)
    

提交回复
热议问题