Arithmetic mean of non-null cells, returned as Double.
Int columns accumulate the numerator in Double (the mean's output
type), so a large-magnitude column cannot wrap past 2^63 and flip the
mean's sign; Float columns accumulate in Double. The division is
performed in Double. (Series::sum, by contrast, keeps the Int dtype
and so accumulates in Int64, overflowing past 2^63.)
The denominator is the non-null count (Series::count), so a
Float NaN is a present value that both counts toward the divisor
and propagates: any non-null NaN makes the mean NaN (Polars
semantics; only Null is skipped).
- Empty / all-null numeric series → raise InvalidOperation(...).
- Non-numeric series → raise TypeMismatch(...).