pandas.Series.argsort
- Series.argsort(axis=0, kind='quicksort', order=None)[source]
-
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.
- Parameters
-
- axis:{0 or “index”}
-
Has no effect but is accepted for compatibility with numpy.
- kind:{‘mergesort’, ‘quicksort’, ‘heapsort’, ‘stable’}, default ‘quicksort’
-
Choice of sorting algorithm. See
numpy.sort()
for more information. ‘mergesort’ and ‘stable’ are the only stable algorithms. - order:None
-
Has no effect but is accepted for compatibility with numpy.
- Returns
-
- Series[np.intp]
-
Positions of values within the sort order with -1 indicating nan values.
See also
numpy.ndarray.argsort
-
Returns the indices that would sort this array.
© 2008–2021, 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.3.4/reference/api/pandas.Series.argsort.html