慕姐4208626
帮助Series.reset_index是reset_index(self, level=None, drop=False, name=None, inplace=False) Generate a new DataFrame or Series with the index reset. This is useful when the index needs to be treated as a column, or when the index is meaningless and needs to be reset to the default before another operation. ...文档drop是 drop : bool, default False Just reset the index, without inserting it as a column in the new DataFrame.默认情况下,该系列将转换为具有新索引的数据帧。但是使用 时drop=False,会返回带有重置索引的系列。这对我来说似乎是倒退的 - 默认重置系列索引将是“reset_index”恕我直言的更自然的结果。