def argsort(self, *args, **kwargs):
    "Return the indices that would sort the Categorical.\n\n        Parameters\n        ----------\n        ascending : bool, default True\n            Whether the indices should result in an ascending\n            or descending sort.\n        kind : {'quicksort', 'mergesort', 'heapsort'}, optional\n            Sorting algorithm.\n        *args, **kwargs:\n            passed through to :func:`numpy.argsort`.\n\n        Returns\n        -------\n        argsorted : numpy array\n\n        See also\n        --------\n        numpy.ndarray.argsort\n\n        Notes\n        -----\n        While an ordering is applied to the category values, arg-sorting\n        in this context refers more to organizing and grouping together\n        based on matching category values. Thus, this function can be\n        called on an unordered Categorical instance unlike the functions\n        'Categorical.min' and 'Categorical.max'.\n\n        Examples\n        --------\n        >>> pd.Categorical(['b', 'b', 'a', 'c']).argsort()\n        array([2, 0, 1, 3])\n\n        >>> cat = pd.Categorical(['b', 'b', 'a', 'c'],\n        ...                      categories=['c', 'b', 'a'],\n        ...                      ordered=True)\n        >>> cat.argsort()\n        array([3, 0, 1, 2])\n        "
    return super(Categorical, self).argsort(*args, **kwargs)
Return the indices that would sort the Categorical.

Parameters
----------
ascending : bool, default True
    Whether the indices should result in an ascending
    or descending sort.
kind : {'quicksort', 'mergesort', 'heapsort'}, optional
    Sorting algorithm.
*args, **kwargs:
    passed through to :func:`numpy.argsort`.

Returns
-------
argsorted : numpy array

See also
--------
numpy.ndarray.argsort

Notes
-----
While an ordering is applied to the category values, arg-sorting
in this context refers more to organizing and grouping together
based on matching category values. Thus, this function can be
called on an unordered Categorical instance unlike the functions
'Categorical.min' and 'Categorical.max'.

Examples
--------
>>> pd.Categorical(['b', 'b', 'a', 'c']).argsort()
array([2, 0, 1, 3])

>>> cat = pd.Categorical(['b', 'b', 'a', 'c'],
...                      categories=['c', 'b', 'a'],
...                      ordered=True)
>>> cat.argsort()
array([3, 0, 1, 2])
def argsort(self, *args, **kwargs):
    "Return the indices that would sort the Categorical.\n\n        Parameters\n        ----------\n        ascending : bool, default True\n            Whether the indices should result in an ascending\n            or descending sort.\n        kind : {'quicksort', 'mergesort', 'heapsort'}, optional\n            Sorting algorithm.\n        *args, **kwargs:\n            passed through to :func:`numpy.argsort`.\n\n        Returns\n        -------\n        argsorted : numpy array\n\n        See also\n        --------\n        numpy.ndarray.argsort\n\n        Notes\n        -----\n        While an ordering is applied to the category values, arg-sorting\n        in this context refers more to organizing and grouping together\n        based on matching category values. Thus, this function can be\n        called on an unordered Categorical instance unlike the functions\n        'Categorical.min' and 'Categorical.max'.\n\n        Examples\n        --------\n        >>> pd.Categorical(['b', 'b', 'a', 'c']).argsort()\n        array([2, 0, 1, 3])\n\n        >>> cat = pd.Categorical(['b', 'b', 'a', 'c'],\n        ...                      categories=['c', 'b', 'a'],\n        ...                      ordered=True)\n        >>> cat.argsort()\n        array([3, 0, 1, 2])\n        "
    return super(Categorical, self).argsort(*args, **kwargs)