pub trait ChunkCompareEq<Rhs> {
type Item;
// Required methods
fn equal(&self, rhs: Rhs) -> Self::Item;
fn equal_missing(&self, rhs: Rhs) -> Self::Item;
fn not_equal(&self, rhs: Rhs) -> Self::Item;
fn not_equal_missing(&self, rhs: Rhs) -> Self::Item;
}
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) -> PolarsResult<DataFrame> {
let mask = df
.column("column_a")?
.as_materialized_series()
.equal(1)?;
df.filter(&mask)
}
Required Associated Types§
Required Methods§
Sourcefn equal_missing(&self, rhs: Rhs) -> Self::Item
fn equal_missing(&self, rhs: Rhs) -> Self::Item
Check for equality where None == None
.
Sourcefn not_equal_missing(&self, rhs: Rhs) -> Self::Item
fn not_equal_missing(&self, rhs: Rhs) -> Self::Item
Check for inequality where None == None
.