def _merge(self, dataframe, merge=True):
    for (param_dict, features) in zip(self.param_dict, self.features):
        (key, var, agg, on) = self._get_params(param_dict)
        if merge:
            dataframe = dataframe.merge(features, how='left', on=on)
        else:
            new_features = self._get_feature_names(key, var, agg)
            dataframe = pd.concat([dataframe, features[new_features]], axis=1)
    return dataframe
def _merge(self, dataframe, merge=True):
    for (param_dict, features) in zip(self.param_dict, self.features):
        (key, var, agg, on) = self._get_params(param_dict)
        if merge:
            dataframe = dataframe.merge(features, how='left', on=on)
        else:
            new_features = self._get_feature_names(key, var, agg)
            dataframe = pd.concat([dataframe, features[new_features]], axis=1)
    return dataframe