pub struct PandasReductions<'a> { /* private fields */ }Expand description
pandas’ float reductions of one numeric column - sum, mean, var,
std, sem, skew, kurt - adding in numpy’s exact order, so a long
column answers pandas’ bits rather than a nearby value. Measured against
live pandas 2.2.3 / numpy 2.3.5; bead br-frankenpandas-9iim6 holds the
model and the alternatives it rejected.
Implementations§
Source§impl<'a> PandasReductions<'a>
impl<'a> PandasReductions<'a>
Sourcepub fn numpy_nan_missing(values: ReductionValues<'a>) -> Self
pub fn numpy_nan_missing(values: ReductionValues<'a>) -> Self
A numpy float64 array, its NaNs the missing values (nanops’ mask is
isnan); read without a presence bitmap.
Sourcepub fn new(
values: ReductionValues<'a>,
present: Option<&'a [u64]>,
layout: MissingLayout,
) -> Self
pub fn new( values: ReductionValues<'a>, present: Option<&'a [u64]>, layout: MissingLayout, ) -> Self
present is the packed presence bits (None: all present).
Sourcepub fn int64_mean_skipping(values: &[i64], missing: i64) -> f64
pub fn int64_mean_skipping(values: &[i64], missing: i64) -> f64
nanops’ mean of int64 values whose slots holding missing (a
datetime64 column’s NaT) it fills with 0: the total added as float64
through numpy’s cast buffer, 8192 at a time - as Self::mean adds
an int column - read straight off values, over the count of the
others. A filled copy and a presence bitmap the sum only re-zeroed
made a datetime mean 0.37x pandas (br-frankenpandas-vk7y9). NaN when
every slot is missing.
Sourcepub fn var(&self, ddof: usize) -> f64
pub fn var(&self, ddof: usize) -> f64
Series.var(ddof=ddof); NaN with ddof or fewer present values.