Trait polars_core::chunked_array::ops::ChunkWindow[][src]

pub trait ChunkWindow {
    fn rolling_sum(
        &self,
        _window_size: u32,
        _weight: Option<&[f64]>,
        _ignore_null: bool,
        _min_periods: u32
    ) -> Result<Self>
    where
        Self: Sized
, { ... }
fn rolling_mean(
        &self,
        _window_size: u32,
        _weight: Option<&[f64]>,
        _ignore_null: bool,
        _min_periods: u32
    ) -> Result<Self>
    where
        Self: Sized
, { ... }
fn rolling_min(
        &self,
        _window_size: u32,
        _weight: Option<&[f64]>,
        _ignore_null: bool,
        _min_periods: u32
    ) -> Result<Self>
    where
        Self: Sized
, { ... }
fn rolling_max(
        &self,
        _window_size: u32,
        _weight: Option<&[f64]>,
        _ignore_null: bool,
        _min_periods: u32
    ) -> Result<Self>
    where
        Self: Sized
, { ... } }
Expand description

Rolling window functions

Provided methods

fn rolling_sum(
    &self,
    _window_size: u32,
    _weight: Option<&[f64]>,
    _ignore_null: bool,
    _min_periods: u32
) -> Result<Self> where
    Self: Sized
[src]

apply a rolling sum (moving sum) over the values in this array. a window of length window_size will traverse the array. the values that fill this window will (optionally) be multiplied with the weights given by the weight vector. the resulting values will be aggregated to their sum.

Arguments

  • window_size - The length of the window.
  • weight - An optional slice with the same length of the window that will be multiplied elementwise with the values in the window.
  • ignore_null - Toggle behavior of aggregation regarding null values in the window. true -> Null values will be ignored. false -> Any Null in the window leads to a Null in the aggregation result.

fn rolling_mean(
    &self,
    _window_size: u32,
    _weight: Option<&[f64]>,
    _ignore_null: bool,
    _min_periods: u32
) -> Result<Self> where
    Self: Sized
[src]

Apply a rolling mean (moving mean) over the values in this array. A window of length window_size will traverse the array. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector. The resulting values will be aggregated to their mean.

Arguments

  • window_size - The length of the window.
  • weight - An optional slice with the same length of the window that will be multiplied elementwise with the values in the window.
  • ignore_null - Toggle behavior of aggregation regarding null values in the window. true -> Null values will be ignored. false -> Any Null in the window leads to a Null in the aggregation result.
  • min_periods - Amount of elements in the window that should be filled before computing a result.

fn rolling_min(
    &self,
    _window_size: u32,
    _weight: Option<&[f64]>,
    _ignore_null: bool,
    _min_periods: u32
) -> Result<Self> where
    Self: Sized
[src]

Apply a rolling min (moving min) over the values in this array. A window of length window_size will traverse the array. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector. The resulting values will be aggregated to their min.

Arguments

  • window_size - The length of the window.
  • weight - An optional slice with the same length of the window that will be multiplied elementwise with the values in the window.
  • ignore_null - Toggle behavior of aggregation regarding null values in the window. true -> Null values will be ignored. false -> Any Null in the window leads to a Null in the aggregation result.
  • min_periods - Amount of elements in the window that should be filled before computing a result.

fn rolling_max(
    &self,
    _window_size: u32,
    _weight: Option<&[f64]>,
    _ignore_null: bool,
    _min_periods: u32
) -> Result<Self> where
    Self: Sized
[src]

Apply a rolling max (moving max) over the values in this array. A window of length window_size will traverse the array. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector. The resulting values will be aggregated to their max.

Arguments

  • window_size - The length of the window.
  • weight - An optional slice with the same length of the window that will be multiplied elementwise with the values in the window.
  • ignore_null - Toggle behavior of aggregation regarding null values in the window. true -> Null values will be ignored. false -> Any Null in the window leads to a Null in the aggregation result.
  • min_periods - Amount of elements in the window that should be filled before computing a result.

Implementors

impl ChunkWindow for BooleanChunked[src]

impl ChunkWindow for CategoricalChunked[src]

impl ChunkWindow for ListChunked[src]

impl ChunkWindow for Utf8Chunked[src]

impl<T> ChunkWindow for ChunkedArray<T> where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native> + Sub<Output = T::Native> + Mul<Output = T::Native> + Div<Output = T::Native> + Zero + Bounded + NumCast + PartialOrd + One + Copy
[src]

fn rolling_sum(
    &self,
    window_size: u32,
    weight: Option<&[f64]>,
    ignore_null: bool,
    min_periods: u32
) -> Result<Self>
[src]

fn rolling_mean(
    &self,
    window_size: u32,
    weight: Option<&[f64]>,
    ignore_null: bool,
    min_periods: u32
) -> Result<Self>
[src]

fn rolling_min(
    &self,
    window_size: u32,
    weight: Option<&[f64]>,
    ignore_null: bool,
    min_periods: u32
) -> Result<Self>
[src]

fn rolling_max(
    &self,
    window_size: u32,
    weight: Option<&[f64]>,
    ignore_null: bool,
    min_periods: u32
) -> Result<Self>
[src]

impl<T> ChunkWindow for ObjectChunked<T>[src]