pyarrow.compute.array_sort_indices¶
- pyarrow.compute.array_sort_indices(array, /, order='ascending', *, null_placement='at_end', options=None, memory_pool=None)¶
Return the indices that would sort an array.
This function computes an array of indices that define a stable sort of the input array. By default, Null values are considered greater than any other value and are therefore sorted at the end of the array. For floating-point types, NaNs are considered greater than any other non-null value, but smaller than null values.
The handling of nulls and NaNs can be changed in ArraySortOptions.
- Parameters
- arrayArray-like
Argument to compute function.
- order
str
, default “ascending” Which order to sort values in. Accepted values are “ascending”, “descending”.
- null_placement
str
, default “at_end” Where nulls in the input should be sorted. Accepted values are “at_start”, “at_end”.
- options
pyarrow.compute.ArraySortOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.