maxframe.liteframe.groupby.LiteFrameGroupBy.shift#
- LiteFrameGroupBy.shift(periods=1, fill_value=None, columns=None)[source]#
Shift rows within each group by
periodspositions.- Parameters:
- Returns:
Shifted LiteFrame with the same shape (row count preserved). Output dtypes follow the same rules as standalone
shift: they depend on the input dtype andfill_value(columns may be widened when a non-nullfill_valueis supplied).- Return type:
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, which preserves the index). Row count is preserved. Order restoration via a place-back operator (
LiteFrameIlocSetItem) is planned; seedocs/designs/liteframe/operators/window.md.Null-key rows are preserved with a null result (matching pandas
groupby.shift()under the defaultdropna=True); they are not grouped together.