pandas.api.extensions.ExtensionArray.argsort

pandas 3.1.1 · Extensions · method

Get positions describing the order that sorts the values.

Call syntax

pd.api.extensions.ExtensionArray.argsort(
    *,
    ascending=True,
    kind='quicksort',
    na_position='last',
    **kwargs,
)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
ascending Optional
Keyword only
Default True
bool

Choose ascending or descending order. Some sorting methods take one flag per sort key.

kind Optional
Keyword only
Default 'quicksort'
{'quicksort', 'mergesort', 'heapsort', 'stable'}

Choose the implementation variant, such as a sort algorithm or a plot type.

na_position Optional
Keyword only
Default 'last'
{'first', 'last'}

Place missing values first or last in the result.

**kwargs Optional
Additional keyword arguments

Returns

np.ndarray[np.intp]