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
impl ChunkCompareEq<&str> for CategoricalChunked
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 ChunkedArray<StringType>
impl ChunkCompareEq<&str> for ChunkedArray<StringType>
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&CategoricalChunked> for CategoricalChunked
impl ChunkCompareEq<&CategoricalChunked> for CategoricalChunked
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 ChunkedArray<BinaryType>
impl ChunkCompareEq<&ChunkedArray<BinaryType>> for ChunkedArray<BinaryType>
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<BooleanType>> for ChunkedArray<BooleanType>
impl ChunkCompareEq<&ChunkedArray<BooleanType>> for ChunkedArray<BooleanType>
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<FixedSizeListType>> for ChunkedArray<FixedSizeListType>
Available on crate feature dtype-array
only.
impl ChunkCompareEq<&ChunkedArray<FixedSizeListType>> for ChunkedArray<FixedSizeListType>
Available on crate feature
dtype-array
only.type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<ListType>> for ChunkedArray<ListType>
impl ChunkCompareEq<&ChunkedArray<ListType>> for ChunkedArray<ListType>
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<StringType>> for CategoricalChunked
impl ChunkCompareEq<&ChunkedArray<StringType>> for CategoricalChunked
type Item = Result<ChunkedArray<BooleanType>, PolarsError>
Source§impl ChunkCompareEq<&ChunkedArray<StringType>> for ChunkedArray<StringType>
impl ChunkCompareEq<&ChunkedArray<StringType>> for ChunkedArray<StringType>
type Item = ChunkedArray<BooleanType>
Source§impl ChunkCompareEq<&ChunkedArray<StructType>> for ChunkedArray<StructType>
Available on crate feature dtype-struct
only.
impl ChunkCompareEq<&ChunkedArray<StructType>> for ChunkedArray<StructType>
Available on crate feature
dtype-struct
only.