Struct polars_io::predicates::ColumnStats
source · pub struct ColumnStats { /* private fields */ }
Expand description
Statistics of the values in a column.
The following statistics are tracked for each row group:
- Null count
- Minimum value
- Maximum value
Implementations§
source§impl ColumnStats
impl ColumnStats
sourcepub fn new(
field: Field,
null_count: Option<Series>,
min_value: Option<Series>,
max_value: Option<Series>
) -> Self
pub fn new( field: Field, null_count: Option<Series>, min_value: Option<Series>, max_value: Option<Series> ) -> Self
Constructs a new ColumnStats
.
sourcepub fn from_field(field: Field) -> Self
pub fn from_field(field: Field) -> Self
Constructs a new ColumnStats
with only the Field
information and no statistics.
sourcepub fn from_column_literal(s: Series) -> Self
pub fn from_column_literal(s: Series) -> Self
Constructs a new ColumnStats
from a single-value Series.
sourcepub fn get_null_count_state(&self) -> Option<&Series>
pub fn get_null_count_state(&self) -> Option<&Series>
Returns the null count of each row group of the column.
sourcepub fn get_min_state(&self) -> Option<&Series>
pub fn get_min_state(&self) -> Option<&Series>
Returns the minimum value of each row group of the column.
sourcepub fn get_max_state(&self) -> Option<&Series>
pub fn get_max_state(&self) -> Option<&Series>
Returns the maximum value of each row group of the column.
sourcepub fn null_count(&self) -> Option<usize>
pub fn null_count(&self) -> Option<usize>
Returns the null count of the column.
sourcepub fn to_min_max(&self) -> Option<Series>
pub fn to_min_max(&self) -> Option<Series>
Returns the minimum and maximum values of the column as a single Series
.
Trait Implementations§
source§impl Debug for ColumnStats
impl Debug for ColumnStats
source§impl<'de> Deserialize<'de> for ColumnStats
impl<'de> Deserialize<'de> for ColumnStats
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ColumnStats
impl !RefUnwindSafe for ColumnStats
impl Send for ColumnStats
impl Sync for ColumnStats
impl Unpin for ColumnStats
impl !UnwindSafe for ColumnStats
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more