mean(array, *, memory_pool=None, options=None, skip_nulls=True, min_count=1)¶
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.
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.ScalarAggregateOptions, optional) – Parameters altering compute function semantics.
skip_nulls (optional) – Parameter for ScalarAggregateOptions constructor. Either options or skip_nulls can be passed, but not both at the same time.
min_count (optional) – Parameter for ScalarAggregateOptions constructor. Either options or min_count can be passed, but not both at the same time.