pandas.Series.sort_index

Series.sort_index(ascending=True)

Sort object by labels (along an axis)

Parameters:

ascending : boolean or list, default True

Sort ascending vs. descending. Specify list for multiple sort orders

Returns:

sorted_obj : Series

Examples

>>> result1 = s.sort_index(ascending=False)
>>> result2 = s.sort_index(ascending=[1, 0])