def sort_index(self, axis=0, level=None, ascending=True, inplace=False, kind='quicksort', na_position='last', sort_remaining=True):
    "\n        Sort object by labels (along an axis).\n\n        Parameters\n        ----------\n        axis : {0 or 'index', 1 or 'columns'}, default 0\n            The axis along which to sort.  The value 0 identifies the rows,\n            and 1 identifies the columns.\n        level : int or level name or list of ints or list of level names\n            If not None, sort on values in specified index level(s).\n        ascending : bool, default True\n            Sort ascending vs. descending.\n        inplace : bool, default False\n            If True, perform operation in-place.\n        kind : {'quicksort', 'mergesort', 'heapsort'}, default 'quicksort'\n            Choice of sorting algorithm. See also ndarray.np.sort for more\n            information.  `mergesort` is the only stable algorithm. For\n            DataFrames, this option is only applied when sorting on a single\n            column or label.\n        na_position : {'first', 'last'}, default 'last'\n            Puts NaNs at the beginning if `first`; `last` puts NaNs at the end.\n            Not implemented for MultiIndex.\n        sort_remaining : bool, default True\n            If True and sorting by level and index is multilevel, sort by other\n            levels too (in order) after sorting by specified level.\n\n        Returns\n        -------\n        sorted_obj : DataFrame or None\n            DataFrame with sorted index if inplace=False, None otherwise.\n        "
    inplace = validate_bool_kwarg(inplace, 'inplace')
    axis = self._get_axis_number(axis)
    axis_name = self._get_axis_name(axis)
    labels = self._get_axis(axis)
    if (level is not None):
        raise NotImplementedError('level is not implemented')
    if inplace:
        raise NotImplementedError('inplace is not implemented')
    sort_index = labels.argsort()
    if (not ascending):
        sort_index = sort_index[::(- 1)]
    new_axis = labels.take(sort_index)
    return self.reindex(**{axis_name: new_axis})
Sort object by labels (along an axis).

Parameters
----------
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis along which to sort.  The value 0 identifies the rows,
    and 1 identifies the columns.
level : int or level name or list of ints or list of level names
    If not None, sort on values in specified index level(s).
ascending : bool, default True
    Sort ascending vs. descending.
inplace : bool, default False
    If True, perform operation in-place.
kind : {'quicksort', 'mergesort', 'heapsort'}, default 'quicksort'
    Choice of sorting algorithm. See also ndarray.np.sort for more
    information.  `mergesort` is the only stable algorithm. For
    DataFrames, this option is only applied when sorting on a single
    column or label.
na_position : {'first', 'last'}, default 'last'
    Puts NaNs at the beginning if `first`; `last` puts NaNs at the end.
    Not implemented for MultiIndex.
sort_remaining : bool, default True
    If True and sorting by level and index is multilevel, sort by other
    levels too (in order) after sorting by specified level.

Returns
-------
sorted_obj : DataFrame or None
    DataFrame with sorted index if inplace=False, None otherwise.
def sort_index(self, axis=0, level=None, ascending=True, inplace=False, kind='quicksort', na_position='last', sort_remaining=True):
    "\n        Sort object by labels (along an axis).\n\n        Parameters\n        ----------\n        axis : {0 or 'index', 1 or 'columns'}, default 0\n            The axis along which to sort.  The value 0 identifies the rows,\n            and 1 identifies the columns.\n        level : int or level name or list of ints or list of level names\n            If not None, sort on values in specified index level(s).\n        ascending : bool, default True\n            Sort ascending vs. descending.\n        inplace : bool, default False\n            If True, perform operation in-place.\n        kind : {'quicksort', 'mergesort', 'heapsort'}, default 'quicksort'\n            Choice of sorting algorithm. See also ndarray.np.sort for more\n            information.  `mergesort` is the only stable algorithm. For\n            DataFrames, this option is only applied when sorting on a single\n            column or label.\n        na_position : {'first', 'last'}, default 'last'\n            Puts NaNs at the beginning if `first`; `last` puts NaNs at the end.\n            Not implemented for MultiIndex.\n        sort_remaining : bool, default True\n            If True and sorting by level and index is multilevel, sort by other\n            levels too (in order) after sorting by specified level.\n\n        Returns\n        -------\n        sorted_obj : DataFrame or None\n            DataFrame with sorted index if inplace=False, None otherwise.\n        "
    inplace = validate_bool_kwarg(inplace, 'inplace')
    axis = self._get_axis_number(axis)
    axis_name = self._get_axis_name(axis)
    labels = self._get_axis(axis)
    if (level is not None):
        raise NotImplementedError('level is not implemented')
    if inplace:
        raise NotImplementedError('inplace is not implemented')
    sort_index = labels.argsort()
    if (not ascending):
        sort_index = sort_index[::(- 1)]
    new_axis = labels.take(sort_index)
    return self.reindex(**{axis_name: new_axis})