Trait polars::chunked_array::ops::ChunkAgg

source ·
pub trait ChunkAgg<T> {
    // Provided methods
    fn sum(&self) -> Option<T> { ... }
    fn min(&self) -> Option<T> { ... }
    fn max(&self) -> Option<T> { ... }
    fn min_max(&self) -> Option<(T, T)> { ... }
    fn mean(&self) -> Option<f64> { ... }
}
Expand description

Aggregation operations.

Provided Methods§

source

fn sum(&self) -> Option<T>

Aggregate the sum of the ChunkedArray. Returns None if not implemented for T. If the array is empty, 0 is returned

source

fn min(&self) -> Option<T>

source

fn max(&self) -> Option<T>

Returns the maximum value in the array, according to the natural order. Returns None if the array is empty or only contains null values.

source

fn min_max(&self) -> Option<(T, T)>

source

fn mean(&self) -> Option<f64>

Returns the mean value in the array. Returns None if the array is empty or only contains null values.

Implementors§

source§

impl<T> ChunkAgg<<T as PolarsNumericType>::Native> for ChunkedArray<T>
where PrimitiveArray<<T as PolarsNumericType>::Native>: for<'a> MinMaxKernel<Scalar<'a> = <T as PolarsNumericType>::Native>, <<T as PolarsNumericType>::Native as Simd>::Simd: Add<Output = <<T as PolarsNumericType>::Native as Simd>::Simd> + Sum<<T as PolarsNumericType>::Native>, T: PolarsNumericType,