def aggregate(self, stream, group_by=None, operators=None):
        """
        takes an input stream (pandas data frame) and perform a group-by + aggregation.
        for instance: aggregate(data, group_by=['col1'], operators={'col2': 'sum'})
        """
        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
dataset/ETHPy150Open Convertro/Hydro/src/hydro/transformers.py/Transformers.aggregate/original