DataFrame.rheon.with_windows¶
- DataFrameRheonNamespace.with_windows(*exprs: pl.Expr, clock: str | None = None, gap_cap: float | Duration | None = None, restart_after_step_back: float | Duration | None = None, session: str | None = None, session_gap: float | Duration | None = None, group: str | None = None, like: dict[str, Any] | None = None, chunk_size: int | None = None, load_state: State | bytes | None = None, save_state: State | None = None, **named: pl.Expr) pl.DataFrame[source]¶
Add one column per window operator’s expression to a frame’s rows.
It is
rheon.polars.stream.with_windows()as a method, asLazyFrameRheonNamespace.with_windows()is for a query.Parameters
*exprs,**namedand every keywordAs
rheon.polars.stream.with_windows()takes them, with the frame as its input.
Returns
The frame with one column added per expression.
Raises
What
rheon.polars.stream.with_windows()raises.Examples
This code reads
tradesfrom Example data:out = trades.rheon.with_windows( mid_5s=rp.ewm_mean("mid", half_life="5s", window_size="1m"), clock="ts", gap_cap="5m", group="symbol", ) print(out.columns[-1], out.height)
mid_5s 3000
See also
rheon.polars.stream.with_windows(), every parameter and what it refuses.