对于一些数据需要重新设置索引,比如时间序列数据可以将时间作为索引,比如股票的分时数据 df.set_index("学校名称",inplace= True)将学校名称这列作为索引df.index = df['学校名称']