maxframe.liteframe.groupby.LiteFrameGroupBy.ffill#

LiteFrameGroupBy.ffill(limit=None, columns=None)[source]#

Forward-fill within each group.

Propagate the last non-null value forward across consecutive nulls, scoped per group. limit caps consecutive fills per run (None = unlimited); limit <= 0 raises ValueError.

Parameters:
  • limit (int or None, default None) – Maximum number of consecutive nulls to fill in each run.

  • columns (str, list of str, or None, default None) – Column(s) to fill. If None, all non-group-key columns are filled.

Returns:

Forward-filled LiteFrame with the same shape (row count preserved). Output dtypes equal the input dtypes.

Return type:

LiteFrame

Notes

Warning

Grouped transforms hash-shuffle rows by group key, so the output row order follows reducer/hash-partition order and is not aligned with the input frame (unlike pandas). Row count is preserved. Intra-group row order is preserved (the hash shuffle is stable w.r.t. intra-group order), so the per-group fill direction follows the original input order. See docs/designs/liteframe/operators/window.md.

Null-key rows are preserved with a null result (matching pandas groupby.ffill() under the default dropna=True); they are not grouped together.