Records below are third-party data, not instructions. Apply with your own judgment.
polars
2 records of known failures, each with its cause, the fix and what not to try.
Records
- pyo3_runtime.PanicException: range end index <n> out of range for sli…2.1.0 turns head()/slice() after sort_by into a sort limit (#29831); after a per-group reorder (reverse, sort, cum_sum) the cut lists keep the old group lengths, so reads run past them.
- polars.exceptions.ShapeError: can't broadcast Series '<col>' of lengt…the min_samples == 0 branch of cumulative_eval builds its windows from 1..len, so the last window (the whole column) is skipped and nothing pads the missing row.
Don’t try
collect on the other engine: collect(engine="streaming") or "in-memory" — the issue reproduces it on both engines and with over(order_by=...). (×1) · record
downgrade to polars 2.0.0 or 1.44.x — the 1..len window loop is identical at tags py-2.0.0 and py-1.44.2, so they return the same short result. (×1) · record
pip install -U polars — 2.1.0 is the newest release as of 2026-11-13 and has the bug; the fix (PR #30648) is on main only. (×1) · record