Method: Polars::Expr#rolling_sum
- Defined in:
- lib/polars/expr.rb
permalink #rolling_sum(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 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.
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 |
# File 'lib/polars/expr.rb', line 5292 def rolling_sum( window_size, weights: nil, min_periods: nil, center: false ) _from_rbexpr( _rbexpr.rolling_sum( window_size, weights, min_periods, center ) ) end |