Return the integer indices that would sort the Series values.
Override ndarray.argsort. Argsorts the value, omitting NA/null values, and places the result in the same locations as the non-NA values.
Unused. Parameter needed for compatibility with DataFrame.
Choice of sorting algorithm. See numpy.sort() for more information. ‘mergesort’ and ‘stable’ are the only stable algorithms.
Has no effect but is accepted for compatibility with numpy.
Has no effect but is accepted for compatibility with numpy.
Positions of values within the sort order with -1 indicating nan values.
See also
numpy.ndarray.argsortReturns the indices that would sort this array.
Examples
>>> s = pd.Series([3, 2, 1])
>>> s.argsort()
0 2
1 1
2 0
dtype: int64
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.Series.argsort.html