pandas / 1.4.0 / reference / api / pandas.api.extensions.extensionarray.argsort.html /

pandas.api.extensions.ExtensionArray.argsort

ExtensionArray. argsort ( ascending=True, kind='quicksort', na_position='last', *args, **kwargs ) [source]

Return the indices that would sort this array.

Parameters
ascending :bool, default True

Whether the indices should result in an ascending or descending sort.

kind :{‘quicksort’, ‘mergesort’, ‘heapsort’, ‘stable’}, optional

Sorting algorithm.

*args, **kwargs:

Passed through to numpy.argsort().

Returns
np.ndarray[np.intp]

Array of indices that sort self. If NaN values are contained, NaN values are placed at the end.

See also

numpy.argsort

Sorting implementation used internally.

© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.4.0/reference/api/pandas.api.extensions.ExtensionArray.argsort.html