Trait polars::prelude::RollingAgg
source · [−]pub trait RollingAgg {
fn rolling_mean(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>;
fn rolling_sum(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>;
fn rolling_min(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>;
fn rolling_max(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>;
fn rolling_median(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>;
fn rolling_quantile(
&self,
quantile: f64,
interpolation: QuantileInterpolOptions,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>;
fn rolling_var(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>;
fn rolling_std(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>;
}
Required Methods
fn rolling_mean(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
fn rolling_mean(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
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.
fn rolling_sum(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
fn rolling_sum(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
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.
fn rolling_min(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
fn rolling_min(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
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.
fn rolling_max(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
fn rolling_max(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
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.
fn rolling_median(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
fn rolling_median(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
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.
fn rolling_quantile(
&self,
quantile: f64,
interpolation: QuantileInterpolOptions,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
fn rolling_quantile(
&self,
quantile: f64,
interpolation: QuantileInterpolOptions,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
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.
fn rolling_var(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
fn rolling_var(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
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.
fn rolling_std(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
fn rolling_std(
&self,
options: RollingOptionsImpl<'_>
) -> Result<Series, PolarsError>
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.