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
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ChunkZip<StructType> for ChunkedArray<StructType>
Available on crate feature
dtype-struct only.