Method: Polars::Expr#rolling_sum_by
- Defined in:
- lib/polars/expr.rb
permalink #rolling_sum_by(by, window_size, min_periods: 1, closed: "right", warn_if_unsorted: nil) ⇒ Expr
Note:
If you want to compute multiple aggregation statistics over the same dynamic
window, consider using rolling
- this method can cache the window size
computation.
Apply a rolling sum based on another column.
4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 |
# File 'lib/polars/expr.rb', line 4480 def rolling_sum_by( by, window_size, min_periods: 1, closed: "right", warn_if_unsorted: nil ) window_size = _prepare_rolling_by_window_args(window_size) by = Utils.parse_into_expression(by) _from_rbexpr( _rbexpr.rolling_sum_by(by, window_size, min_periods, closed) ) end |