Trait polars_core::chunked_array::ops::ChunkCompare [−][src]
pub trait ChunkCompare<Rhs> { fn eq_missing(&self, rhs: Rhs) -> BooleanChunked; fn eq(&self, rhs: Rhs) -> BooleanChunked; fn neq(&self, rhs: Rhs) -> BooleanChunked; fn gt(&self, rhs: Rhs) -> BooleanChunked; fn gt_eq(&self, rhs: Rhs) -> BooleanChunked; fn lt(&self, rhs: Rhs) -> BooleanChunked; fn lt_eq(&self, rhs: Rhs) -> BooleanChunked; }
Expand description
Compare Series
and ChunkedArray’s and get a boolean
mask that
can be used to filter rows.
Example
use polars_core::prelude::*; fn filter_all_ones(df: &DataFrame) -> Result<DataFrame> { let mask = df .column("column_a")? .eq(1); df.filter(&mask) }
Required methods
fn eq_missing(&self, rhs: Rhs) -> BooleanChunked
fn eq_missing(&self, rhs: Rhs) -> BooleanChunked
Check for equality and regard missing values as equal.
fn eq(&self, rhs: Rhs) -> BooleanChunked
fn eq(&self, rhs: Rhs) -> BooleanChunked
Check for equality.
fn neq(&self, rhs: Rhs) -> BooleanChunked
fn neq(&self, rhs: Rhs) -> BooleanChunked
Check for inequality.
fn gt(&self, rhs: Rhs) -> BooleanChunked
fn gt(&self, rhs: Rhs) -> BooleanChunked
Greater than comparison.
fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
Greater than or equal comparison.
fn lt(&self, rhs: Rhs) -> BooleanChunked
fn lt(&self, rhs: Rhs) -> BooleanChunked
Less than comparison.
fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
Less than or equal comparison