Type Definition polars_core::datatypes::BooleanChunked
source · [−]pub type BooleanChunked = ChunkedArray<BooleanType>;
Implementations
Trait Implementations
sourceimpl AggList for BooleanChunked
impl AggList for BooleanChunked
fn agg_list(&self, groups: &GroupsProxy) -> Option<Series>
sourceimpl ArgAgg for BooleanChunked
impl ArgAgg for BooleanChunked
sourceimpl BitAnd<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
impl BitAnd<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
sourceimpl BitAnd<ChunkedArray<BooleanType>> for BooleanChunked
impl BitAnd<ChunkedArray<BooleanType>> for BooleanChunked
sourceimpl BitOr<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
impl BitOr<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
sourceimpl BitOr<ChunkedArray<BooleanType>> for BooleanChunked
impl BitOr<ChunkedArray<BooleanType>> for BooleanChunked
sourceimpl BitXor<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
impl BitXor<&'_ ChunkedArray<BooleanType>> for &BooleanChunked
sourceimpl BitXor<ChunkedArray<BooleanType>> for BooleanChunked
impl BitXor<ChunkedArray<BooleanType>> for BooleanChunked
sourceimpl ChunkAgg<u32> for BooleanChunked
impl ChunkAgg<u32> for BooleanChunked
Booleans are casted to 1 or 0.
sourceimpl ChunkAggSeries for BooleanChunked
impl ChunkAggSeries for BooleanChunked
sourcefn sum_as_series(&self) -> Series
fn sum_as_series(&self) -> Series
Get the sum of the ChunkedArray as a new Series of length 1.
sourcefn max_as_series(&self) -> Series
fn max_as_series(&self) -> Series
Get the max of the ChunkedArray as a new Series of length 1.
sourcefn min_as_series(&self) -> Series
fn min_as_series(&self) -> Series
Get the min of the ChunkedArray as a new Series of length 1.
sourcefn prod_as_series(&self) -> Series
fn prod_as_series(&self) -> Series
Get the product of the ChunkedArray as a new Series of length 1.
sourceimpl ChunkAnyValue for BooleanChunked
impl ChunkAnyValue for BooleanChunked
sourceunsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
Get a single value. Beware this is slow. If you need to use this slightly performant, cast Categorical to UInt32 Read more
sourcefn get_any_value(&self, index: usize) -> AnyValue<'_>
fn get_any_value(&self, index: usize) -> AnyValue<'_>
Get a single value. Beware this is slow.
sourceimpl<'a> ChunkApply<'a, bool, bool> for BooleanChunked
impl<'a> ChunkApply<'a, bool, bool> for BooleanChunked
sourcefn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(bool) -> S::Native + Copy,
S: PolarsNumericType,
fn apply_cast_numeric<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(bool) -> S::Native + Copy,
S: PolarsNumericType,
Apply a closure elementwise and cast to a Numeric ChunkedArray. This is fastest when the null check branching is more expensive than the closure application. Read more
sourcefn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<bool>) -> S::Native + Copy,
S: PolarsNumericType,
fn branch_apply_cast_numeric_no_null<F, S>(&self, f: F) -> ChunkedArray<S> where
F: Fn(Option<bool>) -> S::Native + Copy,
S: PolarsNumericType,
Apply a closure on optional values and cast to Numeric ChunkedArray without null values.
sourcefn apply<F>(&self, f: F) -> Self where
F: Fn(bool) -> bool + Copy,
fn apply<F>(&self, f: F) -> Self where
F: Fn(bool) -> bool + Copy,
Apply a closure elementwise. This is fastest when the null check branching is more expensive than the closure application. Often it is. Read more
fn try_apply<F>(&self, f: F) -> Result<Self> where
F: Fn(bool) -> Result<bool> + Copy,
sourcefn apply_on_opt<F>(&'a self, f: F) -> Self where
F: Fn(Option<bool>) -> Option<bool> + Copy,
fn apply_on_opt<F>(&'a self, f: F) -> Self where
F: Fn(Option<bool>) -> Option<bool> + Copy,
Apply a closure elementwise including null values.
sourcefn apply_with_idx<F>(&'a self, f: F) -> Self where
F: Fn((usize, bool)) -> bool + Copy,
fn apply_with_idx<F>(&'a self, f: F) -> Self where
F: Fn((usize, bool)) -> bool + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
sourceimpl ChunkApplyKernel<BooleanArray> for BooleanChunked
impl ChunkApplyKernel<BooleanArray> for BooleanChunked
sourcefn apply_kernel(&self, f: &dyn Fn(&BooleanArray) -> ArrayRef) -> Self
fn apply_kernel(&self, f: &dyn Fn(&BooleanArray) -> ArrayRef) -> Self
Apply kernel and return result as a new ChunkedArray.
sourcefn apply_kernel_cast<S>(
&self,
f: &dyn Fn(&BooleanArray) -> ArrayRef
) -> ChunkedArray<S> where
S: PolarsDataType,
fn apply_kernel_cast<S>(
&self,
f: &dyn Fn(&BooleanArray) -> ArrayRef
) -> ChunkedArray<S> where
S: PolarsDataType,
Apply a kernel that outputs an array of different type.
sourceimpl ChunkCast for BooleanChunked
impl ChunkCast for BooleanChunked
sourceimpl ChunkCompare<&'_ ChunkedArray<BooleanType>> for BooleanChunked
impl ChunkCompare<&'_ ChunkedArray<BooleanType>> for BooleanChunked
sourcefn eq_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
fn eq_missing(&self, rhs: &BooleanChunked) -> BooleanChunked
Check for equality and regard missing values as equal.
sourcefn equal(&self, rhs: &BooleanChunked) -> BooleanChunked
fn equal(&self, rhs: &BooleanChunked) -> BooleanChunked
Check for equality.
sourcefn not_equal(&self, rhs: &BooleanChunked) -> BooleanChunked
fn not_equal(&self, rhs: &BooleanChunked) -> BooleanChunked
Check for inequality.
sourcefn gt(&self, rhs: &BooleanChunked) -> BooleanChunked
fn gt(&self, rhs: &BooleanChunked) -> BooleanChunked
Greater than comparison.
sourcefn gt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
fn gt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
Greater than or equal comparison.
sourcefn lt(&self, rhs: &BooleanChunked) -> BooleanChunked
fn lt(&self, rhs: &BooleanChunked) -> BooleanChunked
Less than comparison.
sourcefn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
fn lt_eq(&self, rhs: &BooleanChunked) -> BooleanChunked
Less than or equal comparison
sourceimpl ChunkExpandAtIndex<BooleanType> for BooleanChunked
impl ChunkExpandAtIndex<BooleanType> for BooleanChunked
sourcefn expand_at_index(&self, index: usize, length: usize) -> BooleanChunked
fn expand_at_index(&self, index: usize, length: usize) -> BooleanChunked
Create a new ChunkedArray filled with values at that index.
sourceimpl ChunkFillNull for BooleanChunked
impl ChunkFillNull for BooleanChunked
sourcefn fill_null(&self, strategy: FillNullStrategy) -> Result<Self>
fn fill_null(&self, strategy: FillNullStrategy) -> Result<Self>
Replace None values with one of the following strategies: Read more
sourceimpl ChunkFillNullValue<bool> for BooleanChunked
impl ChunkFillNullValue<bool> for BooleanChunked
sourcefn fill_null_with_values(&self, value: bool) -> Result<Self>
fn fill_null_with_values(&self, value: bool) -> Result<Self>
Replace None values with a give value T
.
sourceimpl ChunkFilter<BooleanType> for BooleanChunked
impl ChunkFilter<BooleanType> for BooleanChunked
sourcefn filter(&self, filter: &BooleanChunked) -> Result<ChunkedArray<BooleanType>>
fn filter(&self, filter: &BooleanChunked) -> Result<ChunkedArray<BooleanType>>
Filter values in the ChunkedArray with a boolean mask. Read more
sourceimpl ChunkFull<bool> for BooleanChunked
impl ChunkFull<bool> for BooleanChunked
sourceimpl ChunkFullNull for BooleanChunked
impl ChunkFullNull for BooleanChunked
sourceimpl ChunkOps for BooleanChunked
impl ChunkOps for BooleanChunked
sourceimpl ChunkQuantile<bool> for BooleanChunked
impl ChunkQuantile<bool> for BooleanChunked
sourceimpl ChunkReverse<BooleanType> for BooleanChunked
impl ChunkReverse<BooleanType> for BooleanChunked
sourceimpl<'a> ChunkSet<'a, bool, bool> for BooleanChunked
impl<'a> ChunkSet<'a, bool, bool> for BooleanChunked
sourcefn set_at_idx<I: IntoIterator<Item = usize>>(
&'a self,
idx: I,
value: Option<bool>
) -> Result<Self>
fn set_at_idx<I: IntoIterator<Item = usize>>(
&'a self,
idx: I,
value: Option<bool>
) -> Result<Self>
Set the values at indexes idx
to some optional value Option<T>
. Read more
sourcefn set_at_idx_with<I: IntoIterator<Item = usize>, F>(
&'a self,
idx: I,
f: F
) -> Result<Self> where
F: Fn(Option<bool>) -> Option<bool>,
fn set_at_idx_with<I: IntoIterator<Item = usize>, F>(
&'a self,
idx: I,
f: F
) -> Result<Self> where
F: Fn(Option<bool>) -> Option<bool>,
Set the values at indexes idx
by applying a closure to these values. Read more
sourceimpl ChunkShift<BooleanType> for BooleanChunked
impl ChunkShift<BooleanType> for BooleanChunked
sourceimpl ChunkShiftFill<BooleanType, Option<bool>> for BooleanChunked
impl ChunkShiftFill<BooleanType, Option<bool>> for BooleanChunked
sourcefn shift_and_fill(
&self,
periods: i64,
fill_value: Option<bool>
) -> BooleanChunked
fn shift_and_fill(
&self,
periods: i64,
fill_value: Option<bool>
) -> BooleanChunked
Shift the values by a given period and fill the parts that will be empty due to this operation
with fill_value
. Read more
sourceimpl ChunkSort<BooleanType> for BooleanChunked
impl ChunkSort<BooleanType> for BooleanChunked
fn sort_with(&self, options: SortOptions) -> ChunkedArray<BooleanType>
sourcefn sort(&self, reverse: bool) -> BooleanChunked
fn sort(&self, reverse: bool) -> BooleanChunked
Returned a sorted ChunkedArray
.
sourcefn argsort(&self, options: SortOptions) -> IdxCa
fn argsort(&self, options: SortOptions) -> IdxCa
Retrieve the indexes needed to sort this array.
sourceimpl ChunkTake for BooleanChunked
impl ChunkTake for BooleanChunked
sourceunsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Self where
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Self where
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
Take values from ChunkedArray by index. Read more
sourcefn take<I, INulls>(&self, indices: TakeIdx<'_, I, INulls>) -> Result<Self> where
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
fn take<I, INulls>(&self, indices: TakeIdx<'_, I, INulls>) -> Result<Self> where
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
Take values from ChunkedArray by index. Note that the iterator will be cloned, so prefer an iterator that takes the owned memory by reference. Read more
sourceimpl ChunkTakeEvery<BooleanType> for BooleanChunked
impl ChunkTakeEvery<BooleanType> for BooleanChunked
sourcefn take_every(&self, n: usize) -> BooleanChunked
fn take_every(&self, n: usize) -> BooleanChunked
Traverse and collect every nth element in a new array.
sourceimpl ChunkUnique<BooleanType> for BooleanChunked
impl ChunkUnique<BooleanType> for BooleanChunked
sourcefn arg_unique(&self) -> Result<IdxCa>
fn arg_unique(&self) -> Result<IdxCa>
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted. Read more
sourcefn is_unique(&self) -> Result<BooleanChunked>
fn is_unique(&self) -> Result<BooleanChunked>
Get a mask of all the unique values.
sourcefn is_duplicated(&self) -> Result<BooleanChunked>
fn is_duplicated(&self) -> Result<BooleanChunked>
Get a mask of all the duplicated values.
sourcefn mode(&self) -> Result<ChunkedArray<T>>
fn mode(&self) -> Result<ChunkedArray<T>>
The most occurring value(s). Can return multiple Values
sourceimpl ChunkVar<bool> for BooleanChunked
impl ChunkVar<bool> for BooleanChunked
sourceimpl ChunkZip<BooleanType> for BooleanChunked
impl ChunkZip<BooleanType> for BooleanChunked
sourcefn zip_with(
&self,
mask: &BooleanChunked,
other: &BooleanChunked
) -> Result<BooleanChunked>
fn zip_with(
&self,
mask: &BooleanChunked,
other: &BooleanChunked
) -> Result<BooleanChunked>
Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Read more
sourceimpl From<(&'_ str, BooleanArray)> for BooleanChunked
impl From<(&'_ str, BooleanArray)> for BooleanChunked
sourceimpl From<BooleanArray> for BooleanChunked
impl From<BooleanArray> for BooleanChunked
sourcefn from(arr: BooleanArray) -> Self
fn from(arr: BooleanArray) -> Self
Performs the conversion.
sourceimpl FromIterator<bool> for BooleanChunked
impl FromIterator<bool> for BooleanChunked
sourcefn from_iter<I: IntoIterator<Item = bool>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = bool>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl FromParallelIterator<bool> for BooleanChunked
impl FromParallelIterator<bool> for BooleanChunked
sourcefn from_par_iter<I: IntoParallelIterator<Item = bool>>(iter: I) -> Self
fn from_par_iter<I: IntoParallelIterator<Item = bool>>(iter: I) -> Self
Creates an instance of the collection from the parallel iterator par_iter
. Read more
sourceimpl FromTrustedLenIterator<bool> for BooleanChunked
impl FromTrustedLenIterator<bool> for BooleanChunked
fn from_iter_trusted_length<I: IntoIterator<Item = bool>>(iter: I) -> Self where
I::IntoIter: TrustedLen,
sourceimpl IntoGroupsProxy for BooleanChunked
impl IntoGroupsProxy for BooleanChunked
sourcefn group_tuples(&self, multithreaded: bool, sorted: bool) -> GroupsProxy
fn group_tuples(&self, multithreaded: bool, sorted: bool) -> GroupsProxy
Create the tuples need for a groupby operation. * The first value in the tuple is the first index of the group. * The second value in the tuple is are the indexes of the groups including the first value. Read more
sourceimpl<'a> IntoIterator for &'a BooleanChunked
impl<'a> IntoIterator for &'a BooleanChunked
sourceimpl IntoSeries for BooleanChunked
impl IntoSeries for BooleanChunked
sourceimpl<'a> IntoTakeRandom<'a> for &'a BooleanChunked
impl<'a> IntoTakeRandom<'a> for &'a BooleanChunked
type Item = bool
type TakeRandom = TakeRandBranch2<BoolTakeRandomSingleChunk<'a>, BoolTakeRandom<'a>>
sourcefn take_rand(&self) -> Self::TakeRandom
fn take_rand(&self) -> Self::TakeRandom
Create a type that implements TakeRandom
.
sourceimpl IsIn for BooleanChunked
impl IsIn for BooleanChunked
sourcefn is_in(&self, other: &Series) -> Result<BooleanChunked>
fn is_in(&self, other: &Series) -> Result<BooleanChunked>
Check if elements of this array are in the right Series, or List values of the right Series.
sourceimpl NewChunkedArray<BooleanType, bool> for BooleanChunked
impl NewChunkedArray<BooleanType, bool> for BooleanChunked
sourcefn from_iter_values(
name: &str,
it: impl Iterator<Item = bool>
) -> ChunkedArray<BooleanType>
fn from_iter_values(
name: &str,
it: impl Iterator<Item = bool>
) -> ChunkedArray<BooleanType>
Create a new ChunkedArray from an iterator.
fn from_slice(name: &str, v: &[bool]) -> Self
fn from_slice_options(name: &str, opt_v: &[Option<bool>]) -> Self
sourcefn from_iter_options(
name: &str,
it: impl Iterator<Item = Option<bool>>
) -> ChunkedArray<BooleanType>
fn from_iter_options(
name: &str,
it: impl Iterator<Item = Option<bool>>
) -> ChunkedArray<BooleanType>
Create a new ChunkedArray from an iterator.
sourceimpl Not for &BooleanChunked
impl Not for &BooleanChunked
sourceimpl Not for BooleanChunked
impl Not for BooleanChunked
sourceimpl QuantileAggSeries for BooleanChunked
impl QuantileAggSeries for BooleanChunked
sourcefn quantile_as_series(
&self,
_quantile: f64,
_interpol: QuantileInterpolOptions
) -> Result<Series>
fn quantile_as_series(
&self,
_quantile: f64,
_interpol: QuantileInterpolOptions
) -> Result<Series>
Get the quantile of the ChunkedArray as a new Series of length 1.
sourcefn median_as_series(&self) -> Series
fn median_as_series(&self) -> Series
Get the median of the ChunkedArray as a new Series of length 1.
sourceimpl RepeatBy for BooleanChunked
impl RepeatBy for BooleanChunked
sourcefn repeat_by(&self, by: &IdxCa) -> ListChunked
fn repeat_by(&self, by: &IdxCa) -> ListChunked
Repeat the values n
times, where n
is determined by the values in by
.
sourceimpl TakeRandom for BooleanChunked
impl TakeRandom for BooleanChunked
sourceimpl VarAggSeries for BooleanChunked
impl VarAggSeries for BooleanChunked
sourcefn var_as_series(&self) -> Series
fn var_as_series(&self) -> Series
Get the variance of the ChunkedArray as a new Series of length 1.
sourcefn std_as_series(&self) -> Series
fn std_as_series(&self) -> Series
Get the standard deviation of the ChunkedArray as a new Series of length 1.