pyarrow.compute.approximate_median(array, /, *, skip_nulls=True, min_count=1, options=None, memory_pool=None)#

Approximate median of a numeric array with T-Digest algorithm.

Nulls and NaNs are ignored. A null scalar is returned if there is no valid data point.


Argument to compute function.

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 1

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

optionspyarrow.compute.ScalarAggregateOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.