一:改变索引 reindex方法对于Series直接索引,对于DataFrame既可以改变行索引,也可以改变列索引,还可以两个一起改变. 1)对于Series In [2]: seri = pd.Series([4.5,7.2,-5.3,3.6],index = ['d','b','a','c']) In [3]: seri Out[3]: d 4.5 b 7.2 a -5.3 c 3.6 dtype: float64 In [4]: seri1 = seri.reindex(['a','b',