如何删除python给出的默认索引

时间:2017-05-13 06:02:26

标签: python dataframe

如果我有这样的数据帧,我该如何删除有619,653等的列。

enter image description here

1 个答案:

答案 0 :(得分:1)

解决方案:

参见下面给出的例子:

import pandas

data = pandas.read_csv("csv_file.csv")

data.to_csv("csv_file_without_index.csv", index=None, header=None)

现在,将创建一个名为csv_file_without_index的新文件,不带索引和标题。

干杯!!