[ Web Proxy ]
URL:
Viewing: https://arrow.apache.org/docs/python/generated/pyarrow.compute.RankOptions.html [Back]  [Original]

pyarrow.compute.RankOptions — Apache Arrow v25.0.1
Back to top
Search the docs ...:

pyarrow.compute.RankOptions#

class pyarrow.compute.RankOptions(sort_keys='ascending', *, null_placement=None, tiebreaker='first')#

Bases: _RankOptions

Options for the rank function.

Parameters:
sort_keyssequence of (name, order, null_placement) tuples or str, default ascending

Names of field/column keys to sort the input on, along with the order each field/column is sorted in. Accepted values for order are ascending, descending. Accepted values for null_placement are at_start, at_end. The field name can be a string column name or expression. Alternatively, one can simply pass ascending or descending as a string if the input is array-like.

null_placementstr | None, default None

Where nulls in input should be sorted. Accepted values are at_start, at_end. Overwrites the null_placement inside sort_keys

tiebreakerstr, default first

Configure how ties between equal values are handled. Accepted values are:

  • min: Ties get the smallest possible rank in sorted order.

  • max: Ties get the largest possible rank in sorted order.

  • first: Ranks are assigned in order of when ties appear in the

    input. This ensures the ranks are a stable permutation of the input.

  • dense: The ranks span a dense [1, M] interval where M is the

    number of distinct values in the input.

__init__(self, sort_keys='ascending', *, null_placement=None, tiebreaker='first')#

Methods

__init__(self[,sort_keys,null_placement,...])

deserialize(buf)

Deserialize options for a function.

serialize(self)

static deserialize(buf)#

Deserialize options for a function.

Parameters:
bufBuffer

The buffer containing the data to deserialize.

serialize(self)#

Web Proxy Viewer  |  New URL  |  Original Page