Trait polars_core::chunked_array::ops::ChunkCompare [−][src]
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;
}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) -> BooleanChunked
fn eq_missing(&self, rhs: Rhs) -> BooleanChunkedCheck for equality and regard missing values as equal.
fn eq(&self, rhs: Rhs) -> BooleanChunked
fn eq(&self, rhs: Rhs) -> BooleanChunkedCheck for equality.
fn neq(&self, rhs: Rhs) -> BooleanChunked
fn neq(&self, rhs: Rhs) -> BooleanChunkedCheck for inequality.
fn gt(&self, rhs: Rhs) -> BooleanChunked
fn gt(&self, rhs: Rhs) -> BooleanChunkedGreater than comparison.
fn gt_eq(&self, rhs: Rhs) -> BooleanChunked
fn gt_eq(&self, rhs: Rhs) -> BooleanChunkedGreater than or equal comparison.
fn lt(&self, rhs: Rhs) -> BooleanChunked
fn lt(&self, rhs: Rhs) -> BooleanChunkedLess than comparison.
fn lt_eq(&self, rhs: Rhs) -> BooleanChunked
fn lt_eq(&self, rhs: Rhs) -> BooleanChunkedLess than or equal comparison
Implementors
impl<T> ChunkCompare<&'_ ChunkedArray<T>> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumComp, impl<T, Rhs> ChunkCompare<Rhs> for ChunkedArray<T> where
T: PolarsNumericType,
T::Native: NumCast,
Rhs: NumComp + ToPrimitive,