且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

重命名未命名的列Pandas数据框

更新时间:2023-02-04 07:55:22

您可以使用来查看当前数据框 data.head()

You can view the current dataframe using data.head()

如果返回'Unnamed: 0'作为列标题,则可以通过以下方式对其进行重命名:

if that returns 'Unnamed: 0' as the column title, you can rename it in the following way:

data.rename( columns={'Unnamed: 0':'new column name'}, inplace=True )