def aggregate(self, stream, group_by=None, operators=None):
        if self._execution_plan:
            self._execution_plan.append('aggregate', 'transform')

        if group_by and operators:
            return stream.groupby(group_by).agg(operators)
        else:
            return None
takes an input stream (pandas data frame) and perform a group-by + aggregation.
dataset/ETHPy150Open Convertro/Hydro/src/hydro/transformers.py/Transformers.aggregate