def fit_from_df(self, df):
    sample_grouped = df.groupby(by=self.groupby_attribute)
    for (name, group) in sample_grouped:
        print(('training ' + name))
        simple_model_wrapper = SimpleModelTrainer(self.mdl, self.tbl, self.xheader, self.yheader, self.n_total_point[name], self.n_sample_point[name], groupby_attribute=self.groupby_attribute, groupby_value=name).fit_from_df(group)
        self.groupby_model_wrapper.add_simple_model(simple_model_wrapper)
    return self.groupby_model_wrapper
def fit_from_df(self, df):
    sample_grouped = df.groupby(by=self.groupby_attribute)
    for (name, group) in sample_grouped:
        print(('training ' + name))
        simple_model_wrapper = SimpleModelTrainer(self.mdl, self.tbl, self.xheader, self.yheader, self.n_total_point[name], self.n_sample_point[name], groupby_attribute=self.groupby_attribute, groupby_value=name).fit_from_df(group)
        self.groupby_model_wrapper.add_simple_model(simple_model_wrapper)
    return self.groupby_model_wrapper