Trait polars_time::chunkedarray::RollingAgg
source · pub trait RollingAgg {
fn rolling_mean(
&self,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>;
fn rolling_sum(
&self,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>;
fn rolling_min(
&self,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>;
fn rolling_max(
&self,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>;
fn rolling_median(
&self,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>;
fn rolling_quantile(
&self,
quantile: f64,
interpolation: QuantileInterpolOptions,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>;
fn rolling_var(
&self,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>;
fn rolling_std(
&self,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>;
}
rolling_window
only.Required Methods§
sourcefn rolling_mean(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
fn rolling_mean(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
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 weights
vector. The resulting
values will be aggregated to their mean.
sourcefn rolling_sum(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
fn rolling_sum(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
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 weights
vector. The resulting
values will be aggregated to their sum.
sourcefn rolling_min(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
fn rolling_min(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
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 weights
vector. The resulting
values will be aggregated to their min.
sourcefn rolling_max(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
fn rolling_max(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
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 weights
vector. The resulting
values will be aggregated to their max.
sourcefn rolling_median(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
fn rolling_median(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
Apply a rolling median (moving median) 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 weighted according to the weights
vector.
sourcefn rolling_quantile(
&self,
quantile: f64,
interpolation: QuantileInterpolOptions,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>
fn rolling_quantile(
&self,
quantile: f64,
interpolation: QuantileInterpolOptions,
options: RollingOptionsImpl<'_>
) -> PolarsResult<Series>
Apply a rolling quantile (moving quantile) 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 weighted according to the weights
vector.
sourcefn rolling_var(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
fn rolling_var(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
Apply a rolling var (moving var) 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 weights
vector. The resulting
values will be aggregated to their var.
sourcefn rolling_std(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
fn rolling_std(&self, options: RollingOptionsImpl<'_>) -> PolarsResult<Series>
Apply a rolling std (moving std) 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 weights
vector. The resulting
values will be aggregated to their std.