[][src]Trait polars::chunked_array::ops::ChunkCompare

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; }

Compare Series and ChunkedArray's and get a boolean mask that can be used to filter rows.

Example

use polars::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

Check for equality and regard missing values as equal.

fn eq(&self, rhs: Rhs) -> BooleanChunked

Check for equality.

fn neq(&self, rhs: Rhs) -> BooleanChunked

Check for inequality.

fn gt(&self, rhs: Rhs) -> BooleanChunked

Greater than comparison.

fn gt_eq(&self, rhs: Rhs) -> BooleanChunked

Greater than or equal comparison.

fn lt(&self, rhs: Rhs) -> BooleanChunked

Less than comparison.

fn lt_eq(&self, rhs: Rhs) -> BooleanChunked

Less than or equal comparison

Loading content...

Implementors

impl<'_> ChunkCompare<&'_ Series> for Series[src]

fn eq(&self, rhs: &Series) -> BooleanChunked[src]

Create a boolean mask by checking for equality.

fn neq(&self, rhs: &Series) -> BooleanChunked[src]

Create a boolean mask by checking for inequality.

fn gt(&self, rhs: &Series) -> BooleanChunked[src]

Create a boolean mask by checking if lhs > rhs.

fn gt_eq(&self, rhs: &Series) -> BooleanChunked[src]

Create a boolean mask by checking if lhs >= rhs.

fn lt(&self, rhs: &Series) -> BooleanChunked[src]

Create a boolean mask by checking if lhs < rhs.

fn lt_eq(&self, rhs: &Series) -> BooleanChunked[src]

Create a boolean mask by checking if lhs <= rhs.

impl<'_> ChunkCompare<&'_ str> for Series[src]

impl<'_> ChunkCompare<&'_ str> for Utf8Chunked[src]

impl<'_> ChunkCompare<&'_ ChunkedArray<BooleanType>> for BooleanChunked[src]

impl<'_> ChunkCompare<&'_ ChunkedArray<LargeListType>> for LargeListChunked[src]

impl<'_> ChunkCompare<&'_ ChunkedArray<Utf8Type>> for Utf8Chunked[src]

impl<Rhs> ChunkCompare<Rhs> for Series where
    Rhs: NumComp
[src]

impl<T, '_> ChunkCompare<&'_ ChunkedArray<T>> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast + NumComp + ToPrimitive
[src]

impl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: NumCast,
    Rhs: NumComp + ToPrimitive
[src]

Loading content...