Trait polars::series::ChunkCompare [−][src]
pub trait ChunkCompare<Rhs> { fn eq_missing(&self, rhs: Rhs) -> ChunkedArray<BooleanType>; fn eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>; fn neq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>; fn gt(&self, rhs: Rhs) -> ChunkedArray<BooleanType>; fn gt_eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>; fn lt(&self, rhs: Rhs) -> ChunkedArray<BooleanType>; fn lt_eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>; }
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) -> Result<DataFrame> { let mask = df .column("column_a")? .eq(1); df.filter(&mask) }
Required methods
fn eq_missing(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]
fn eq_missing(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]Check for equality and regard missing values as equal.
fn eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]
fn eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]Check for equality.
fn neq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]
fn neq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]Check for inequality.
fn gt(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]
fn gt(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]Greater than comparison.
fn gt_eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]
fn gt_eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]Greater than or equal comparison.
fn lt(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]
fn lt(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]Less than comparison.
fn lt_eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]
fn lt_eq(&self, rhs: Rhs) -> ChunkedArray<BooleanType>
[src]Less than or equal comparison
Implementors
Create a boolean mask by checking for equality.
Create a boolean mask by checking for inequality.
Create a boolean mask by checking if lhs > rhs.
Create a boolean mask by checking if lhs >= rhs.
Create a boolean mask by checking if lhs < rhs.
Create a boolean mask by checking if lhs <= rhs.
impl<'_, T> ChunkCompare<&'_ ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
<T as ArrowPrimitiveType>::Native: NumComp,
[src]
impl<'_, T> ChunkCompare<&'_ ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
<T as ArrowPrimitiveType>::Native: NumComp,
[src]impl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T> where
T: PolarsNumericType,
Rhs: NumComp + ToPrimitive,
<T as ArrowPrimitiveType>::Native: NumCast,
[src]
impl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T> where
T: PolarsNumericType,
Rhs: NumComp + ToPrimitive,
<T as ArrowPrimitiveType>::Native: NumCast,
[src]