pandas.Series.sort_index¶
- Series.sort_index(ascending=True)¶
Sort object by labels (along an axis)
- ascending : boolean or list, default True
- Sort ascending vs. descending. Specify list for multiple sort orders
>>> result1 = s.sort_index(ascending=False) >>> result2 = s.sort_index(ascending=[1, 0])
sorted_obj : Series