

def apply(self, data):
    data = sorted(data, key=self.get_group_col)
    return [[self.get_format_group_col(grouped), self.aggregate_func(items, self.aggregate_col)] for (grouped, items) in groupby(data, self.get_group_col)]

dataset/ETHPy150Open dpgaspar/Flask-AppBuilder/flask_appbuilder/models/group.py GroupByCol.apply/original