| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/../generated/pyarrow.compute.bottom_k_unstable.html | [Back] [Original] |
Section Navigation
Select the indices of the bottom-k ordered elements from array- or table-like data.
This is a specialization for select_k_unstable(). Output is not
guaranteed to be stable.
Array, ChunkedArray, RecordBatch, or TableData to sort and get bottom indices from.
intThe number of k elements to keep.
Column key names to order by when input is table-like data.
A list of at_start or at_endWhether nulls and NaNs are placed at the start or at the end. Accepted values are at_end, at_start.
MemoryPool, optionalIf not passed, will allocate memory from the default memory pool.
Array of indicesIndices of the bottom-k ordered elements
Examples
>>> import pyarrow as pa
>>> import pyarrow.compute as pc
>>> arr = pa.array(["a", "b", "c", None, "e", "f"])
>>> pc.bottom_k_unstable(arr, k=3)
<pyarrow.lib.UInt64Array object at ...>
[
0,
1,
2
]
Copyright 2016-2026 Apache Software Foundation.
Apache Arrow, Arrow, Apache, the Apache logo, and the Apache Arrow project logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.
Created using Sphinx 9.1.0.
Built with the PyData Sphinx Theme 0.20.0.
| Web Proxy Viewer | New URL | Original Page |