pub trait ChunkZip<T: PolarsDataType> {
// Required method
fn zip_with(
&self,
mask: &BooleanChunked,
other: &ChunkedArray<T>,
) -> PolarsResult<ChunkedArray<T>>;
}
Expand description
Combine two ChunkedArray
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<T> ChunkZip<T> for ChunkedArray<T>where
T: PolarsDataType<IsStruct = FalseT>,
T::Array: for<'a> IfThenElseKernel<Scalar<'a> = T::Physical<'a>>,
ChunkedArray<T>: ChunkExpandAtIndex<T>,
Available on crate feature
zip_with
only.