删除 python pandas 中的索引行(不是列)

Remove the index rows, (not column) in python pandas

我对 python pandas 有疑问。我需要删除索引行(不是列)

我正在尝试使用此命令。

data_last.to_csv (r'D:\Matkelp3.csv',index=False)

我仍然得到 index row in the first line

您还必须指定 header=False:

data_last.to_csv(r'D:\Matkelp3.csv', index=False, header=False)