Method: Polars::Expr#rolling_mean
- Defined in:
- lib/polars/expr.rb
permalink #rolling_mean(window_size, weights: nil, min_periods: nil, center: false) ⇒ Expr
Note:
This functionality is experimental and may change without it being considered a breaking change.
Note:
If you want to compute multiple aggregation statistics over the same dynamic
window, consider using group_by_rolling
this method can cache the window size
computation.
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 sum.
5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 |
# File 'lib/polars/expr.rb', line 5214 def rolling_mean( window_size, weights: nil, min_periods: nil, center: false ) _from_rbexpr( _rbexpr.rolling_mean( window_size, weights, min_periods, center ) ) end |