Trait polars::chunked_array::ops::ChunkZip
source · pub trait ChunkZip<T>where
T: PolarsDataType,{
// Required method
fn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<T>
) -> Result<ChunkedArray<T>, PolarsError>;
}
Expand description
Combine two ChunkedArray
based on some predicate.
Required Methods§
sourcefn zip_with(
&self,
mask: &ChunkedArray<BooleanType>,
other: &ChunkedArray<T>
) -> Result<ChunkedArray<T>, PolarsError>
fn zip_with( &self, mask: &ChunkedArray<BooleanType>, other: &ChunkedArray<T> ) -> Result<ChunkedArray<T>, PolarsError>
Create a new ChunkedArray with values from self where the mask evaluates true
and values
from other
where the mask evaluates false
Implementors§
impl ChunkZip<BinaryType> for ChunkedArray<BinaryType>
impl ChunkZip<BooleanType> for ChunkedArray<BooleanType>
impl ChunkZip<FixedSizeListType> for ChunkedArray<FixedSizeListType>
Available on crate feature
dtype-array
only.impl ChunkZip<ListType> for ChunkedArray<ListType>
impl ChunkZip<Utf8Type> for ChunkedArray<Utf8Type>
impl<T> ChunkZip<ObjectType<T>> for ChunkedArray<ObjectType<T>>where T: PolarsObject,
Available on crate feature
object
only.