polars_core::chunked_array::ops

Trait ChunkCompareEq

Source
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§

Source

fn equal(&self, rhs: Rhs) -> Self::Item

Check for equality.

Source

fn equal_missing(&self, rhs: Rhs) -> Self::Item

Check for equality where None == None.

Source

fn not_equal(&self, rhs: Rhs) -> Self::Item

Check for inequality.

Source

fn not_equal_missing(&self, rhs: Rhs) -> Self::Item

Check for inequality where None == None.

Implementors§

Source§

impl ChunkCompareEq<&Column> for Column

Source§

impl ChunkCompareEq<&str> for CategoricalChunked

Available on crate feature dtype-categorical only.
Source§

impl ChunkCompareEq<&str> for Series

Source§

impl ChunkCompareEq<&str> for StringChunked

Source§

impl ChunkCompareEq<&CategoricalChunked> for CategoricalChunked

Available on crate feature dtype-categorical only.
Source§

impl ChunkCompareEq<&Series> for Series

Source§

impl ChunkCompareEq<&ChunkedArray<BinaryType>> for BinaryChunked

Source§

impl ChunkCompareEq<&ChunkedArray<BooleanType>> for BooleanChunked

Source§

impl ChunkCompareEq<&ChunkedArray<FixedSizeListType>> for ArrayChunked

Available on crate feature dtype-array only.
Source§

impl ChunkCompareEq<&ChunkedArray<ListType>> for ListChunked

Source§

impl ChunkCompareEq<&ChunkedArray<StringType>> for CategoricalChunked

Available on crate feature dtype-categorical only.
Source§

impl ChunkCompareEq<&ChunkedArray<StringType>> for StringChunked

Source§

impl ChunkCompareEq<&[u8]> for BinaryChunked

Source§

impl<Rhs> ChunkCompareEq<Rhs> for Series
where Rhs: NumericNative,

Source§

impl<T> ChunkCompareEq<&ChunkedArray<T>> for ChunkedArray<T>
where T: PolarsNumericType, T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,

Source§

impl<T, Rhs> ChunkCompareEq<Rhs> for ChunkedArray<T>
where T: PolarsNumericType, Rhs: ToPrimitive, T::Array: TotalOrdKernel<Scalar = T::Native> + TotalEqKernel<Scalar = T::Native>,