Initializing playground…
← Back to roadmap

🪟 Window Indexers

Custom window indexers let you define arbitrary window shapes for rolling computations — mirrors pandas.api.indexers.

1 — FixedForwardWindowIndexer

The default rolling looks backward. FixedForwardWindowIndexer looks forward — each row's window covers the next N rows.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

2 — VariableOffsetWindowIndexer

Define a different look-back (or look-forward) depth for each row. Useful for event-driven windows or irregular-frequency time series.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

3 — Custom BaseIndexer subclass

Subclass BaseIndexer to implement any window shape you need.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent