Here is how you do that:
df |>
@groupby({_.A, _.B, _.c}) |>
@map({key(_)..., D=sum(_.D), E=mean(_.E)})
or something like that.
The trick is to construct a new named tuple value by which things get grouped in the @groupby
command, and then key(_)
will be a named tuple itself.