maxframe.liteframe.LiteFrame.groupby#

LiteFrame.groupby(by, sort=True, dropna=True, group_keys=True)#

Group the LiteFrame by one or more columns.

Parameters:
  • by (str or list of str) – Column name(s) to group by.

  • sort (bool, default True) – Whether to sort group keys in the result.

  • dropna (bool, default True) – If True, rows with null group keys are dropped before aggregation. If False, null-key rows are included as a separate group.

  • group_keys (bool, default True) – Whether apply / apply_chunk results include the grouping key columns. True (default) prepends keys the UDF did not return (pandas group_keys=True + reset_index() shape); False omits them. Has no effect on agg, transform, or the window family — matching pandas.

Returns:

An intermediate object supporting .agg() and shortcut methods like .sum(), .mean(), etc.

Return type:

LiteFrameGroupBy

Raises:

NotImplementedError – If sort=True is passed.

See also

LiteFrame.agg

Aggregate using one or more operations over columns.

LiteFrame.sort

Sort the LiteFrame by columns.