def _aggregate(self, dataframe):
    self.features = []
    for param_dict in self.param_dict:
        (key, var, agg, on) = self._get_params(param_dict)
        all_features = list(set((key + var)))
        new_features = self._get_feature_names(key, var, agg)
        features = dataframe[all_features].groupby(key)[var].agg(agg).reset_index()
        features.columns = (key + new_features)
        self.features.append(features)
    return self
def _aggregate(self, dataframe):
    self.features = []
    for param_dict in self.param_dict:
        (key, var, agg, on) = self._get_params(param_dict)
        all_features = list(set((key + var)))
        new_features = self._get_feature_names(key, var, agg)
        features = dataframe[all_features].groupby(key)[var].agg(agg).reset_index()
        features.columns = (key + new_features)
        self.features.append(features)
    return self