pyarrow.compute.quantile

pyarrow.compute.quantile(array, *, memory_pool=None, options=None, q=0.5, interpolation='linear', skip_nulls=True, min_count=0)

Compute an array of quantiles of a numeric array or chunked array.

By default, 0.5 quantile (median) is returned. If quantile lies between two data points, an interpolated value is returned based on selected interpolation method. Nulls and NaNs are ignored. An array of nulls is returned if there is no valid data point.

Parameters
  • array (Array-like) – Argument to compute function

  • memory_pool (pyarrow.MemoryPool, optional) – If not passed, will allocate memory from the default memory pool.

  • options (pyarrow.compute.QuantileOptions, optional) – Parameters altering compute function semantics.

  • q (optional) – Parameter for QuantileOptions constructor. Either options or q can be passed, but not both at the same time.

  • interpolation (optional) – Parameter for QuantileOptions constructor. Either options or interpolation can be passed, but not both at the same time.

  • skip_nulls (optional) – Parameter for QuantileOptions constructor. Either options or skip_nulls can be passed, but not both at the same time.

  • min_count (optional) – Parameter for QuantileOptions constructor. Either options or min_count can be passed, but not both at the same time.