pyarrow.compute.mean¶
- pyarrow.compute.mean(array, /, *, skip_nulls=True, min_count=1, options=None, memory_pool=None)¶
Compute the mean of a numeric array.
Null values are ignored by default. Minimum count of non-null values can be set and null is returned if too few are present. This can be changed through ScalarAggregateOptions. The result is a double for integer and floating point arguments, and a decimal with the same bit-width/precision/scale for decimal arguments. For integers and floats, NaN is returned if min_count = 0 and there are no values. For decimals, null is returned instead.
- Parameters
- arrayArray-like
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_count
int
, 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.
- options
pyarrow.compute.ScalarAggregateOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.