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
.
Implementors§
Source§impl ChunkCompareEq<&Column> for Column
impl ChunkCompareEq<&Column> for Column
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§impl ChunkCompareEq<&str> for CategoricalChunked
Available on crate feature dtype-categorical
only.
impl ChunkCompareEq<&str> for CategoricalChunked
Available on crate feature
dtype-categorical
only.type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§impl ChunkCompareEq<&str> for Series
impl ChunkCompareEq<&str> for Series
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§impl ChunkCompareEq<&str> for StringChunked
impl ChunkCompareEq<&str> for StringChunked
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&CategoricalChunked> for CategoricalChunked
Available on crate feature dtype-categorical
only.
impl ChunkCompareEq<&CategoricalChunked> for CategoricalChunked
Available on crate feature
dtype-categorical
only.type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§impl ChunkCompareEq<&Series> for Series
impl ChunkCompareEq<&Series> for Series
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§impl ChunkCompareEq<&ChunkedArray<BinaryType>> for BinaryChunked
impl ChunkCompareEq<&ChunkedArray<BinaryType>> for BinaryChunked
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<BooleanType>> for BooleanChunked
impl ChunkCompareEq<&ChunkedArray<BooleanType>> for BooleanChunked
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<FixedSizeListType>> for ArrayChunked
Available on crate feature dtype-array
only.
impl ChunkCompareEq<&ChunkedArray<FixedSizeListType>> for ArrayChunked
Available on crate feature
dtype-array
only.type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<ListType>> for ListChunked
impl ChunkCompareEq<&ChunkedArray<ListType>> for ListChunked
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<StringType>> for CategoricalChunked
Available on crate feature dtype-categorical
only.
impl ChunkCompareEq<&ChunkedArray<StringType>> for CategoricalChunked
Available on crate feature
dtype-categorical
only.