Trait polars_core::chunked_array::ops::ChunkZip
source · pub trait ChunkZip<T: PolarsDataType> {
fn zip_with(
&self,
mask: &BooleanChunked,
other: &ChunkedArray<T>
) -> PolarsResult<ChunkedArray<T>>;
}
Expand description
Combine 2 ChunkedArrays based on some predicate.
Required Methods§
sourcefn zip_with(
&self,
mask: &BooleanChunked,
other: &ChunkedArray<T>
) -> PolarsResult<ChunkedArray<T>>
fn zip_with(
&self,
mask: &BooleanChunked,
other: &ChunkedArray<T>
) -> PolarsResult<ChunkedArray<T>>
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 BinaryChunked
Available on crate features
zip_with
and dtype-binary
only.impl ChunkZip<BooleanType> for BooleanChunked
Available on crate feature
zip_with
only.impl ChunkZip<ListType> for ListChunked
Available on crate feature
zip_with
only.impl ChunkZip<Utf8Type> for Utf8Chunked
Available on crate feature
zip_with
only.impl<T> ChunkZip<T> for ChunkedArray<T>where
T: PolarsNumericType,
Available on crate feature
zip_with
only.impl<T: PolarsObject> ChunkZip<ObjectType<T>> for ObjectChunked<T>
Available on crate features
zip_with
and object
only.