groupby#

swordfish.function.groupby()#

For each group, calculate func(funcArgs) and return a scalar/vector/dictionary.

Parameters:
  • func (Constant) – A function. For the second use case, func can only have one parameter (funcArg).

  • funcArgs (Constant) – A vector or a tuple with multiple vectors specifying the arguments of func.

  • groupingCol (Constant) – A vector or a tuple with vectors of the same length indicating the grouping column(s). A grouping column and each argument in funcArgs are vectors of the same size.

Returns:

A table, where the number of rows is the same as the number of groups.

Return type:

Constant