pandas dataframe怎么删除index

如题所述

第1个回答  2019-08-20

dataframe.reset_index(drop=True)

就这么简单。

pandas文档原文:

    drop : bool, default False

    Do not try to insert index into dataframe columns. This resets the index to the default integer index.