[][src]Trait polars::chunked_array::apply::Apply

pub trait Apply<'a, A, B> {
    fn apply<F>(&'a self, f: F) -> Self
    where
        F: Fn(A) -> B
; }

Required methods

fn apply<F>(&'a self, f: F) -> Self where
    F: Fn(A) -> B, 

Loading content...

Implementors

impl<'a> Apply<'a, &'a str, String> for Utf8Chunked[src]

impl<'a> Apply<'a, bool, bool> for BooleanChunked[src]

impl<'a, T> Apply<'a, <T as ArrowPrimitiveType>::Native, <T as ArrowPrimitiveType>::Native> for ChunkedArray<T> where
    T: PolarsNumericType
[src]

fn apply<F>(&'a self, f: F) -> Self where
    F: Fn(T::Native) -> T::Native
[src]

Chooses the fastest path for closure application. Null values remain null.

Example

use polars::prelude::*;
fn double(ca: &UInt32Chunked) -> UInt32Chunked {
    ca.apply(|v| v * 2)
}
Loading content...