Rename column by position pandas

前端 未结 0 1063
一向
一向 2020-12-22 04:07

I am trying to rename a column by position in a pandas dataframe.

I tried:

df.rename(columns={ df.columns[0]: "Line Items" }, inplace=True) #         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题