bach.DataFrame.sort_index
sort_index
(level=None, ascending=True)Sort dataframe by index levels.
Parameters
level
(Optional[Union[int, List[int], str, List[str]]]) – int or level name or list of ints or level names. If not specified, all index series are usedascending
(Union[bool, List[bool]]) – Whether to sort ascending (True) or descending (False). If this is a list, then thelevel
must also be a list andlen(ascending) == len(level)
.
Returns
a new DataFrame with the specified ordering, otherwise it updates the original and returns None.