pandas dataframe column name: remove special character

后端 未结 2 910
粉色の甜心
粉色の甜心 2021-01-04 17:09

Some joker made a Lotus database/applet thingy for tracking engineering issues in our company. The joke is that the key piece of information was named with a special charac

2条回答
  •  自闭症患者
    2021-01-04 17:56

    Instead we can use lamda functions for removing special characters in the column

    df2=df1.rename(columns=lambda x:x.strip('*'))

提交回复
热议问题