Trait polars::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, PolarsError> { ... }
fn rolling_mean(
        &self,
        _window_size: u32,
        _weight: Option<&[f64]>,
        _ignore_null: bool,
        _min_periods: u32
    ) -> Result<Self, PolarsError> { ... }
fn rolling_min(
        &self,
        _window_size: u32,
        _weight: Option<&[f64]>,
        _ignore_null: bool,
        _min_periods: u32
    ) -> Result<Self, PolarsError> { ... }
fn rolling_max(
        &self,
        _window_size: u32,
        _weight: Option<&[f64]>,
        _ignore_null: bool,
        _min_periods: u32
    ) -> Result<Self, PolarsError> { ... } }
Expand description

Rolling window functions

Provided methods

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.

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.

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.

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