pyarrow.compute.QuantileOptions#

class pyarrow.compute.QuantileOptions(q=0.5, *, interpolation='linear', skip_nulls=True, min_count=0)#

Bases: _QuantileOptions

Options for the quantile function.

Parameters:
qdouble or sequence of double, default 0.5

Probability levels of the quantiles to compute. All values must be in [0, 1].

interpolationstr, default “linear”

How to break ties between competing data points for a given quantile. Accepted values are:

  • “linear”: compute an interpolation

  • “lower”: always use the smallest of the two data points

  • “higher”: always use the largest of the two data points

  • “nearest”: select the data point that is closest to the quantile

  • “midpoint”: compute the (unweighted) mean of the two data points

skip_nullsbool, default True

Whether to skip (ignore) nulls in the input. If False, any null in the input forces the output to null.

min_countint, default 0

Minimum number of non-null values in the input. If the number of non-null values is below min_count, the output is null.

__init__(self, q=0.5, *, interpolation='linear', skip_nulls=True, min_count=0)#

Methods

__init__(self[, q, interpolation, ...])

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)#