35888e106789800f5dad17a1332fd3888b0b575f,numerox/report.py,Report,append_prediction,#Report#Any#Any#,33

Before Change


    def append_prediction(self, prediction, model_name):
        df = prediction.df
        df = df.rename(columns={"yhat": model_name})
        dfs = [self.df, df]
        df = pd.concat(dfs, axis=1, verify_integrity=True, copy=False)
        self.df = df

    def append_prediction_dict(self, prediction_dict):
        dfs = []

After Change


            y = y.dropna()
            s = df.iloc[0]
            s = s.dropna()
            s = pd.concat([s, y], join="outer", ignore_index=False,
                          verify_integrity=True)
            df = s.to_frame(model_name)
            self.df[model_name] = np.nan
            self.df = pd.merge(self.df, df, how="outer", on=model_name,
                               left_index=True, right_index=True)

    def append_prediction_dict(self, prediction_dict):
        dfs = []
        for model in prediction_dict:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: kwgoodman/numerox
Commit Name: 35888e106789800f5dad17a1332fd3888b0b575f
Time: 2018-01-01
Author: kwgoodman@gmail.com
File Name: numerox/report.py
Class Name: Report
Method Name: append_prediction


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 38a07735faccfe4530860f1a967e195bc70b739c
Time: 2019-04-01
Author: 40067351+zsl3034669@users.noreply.github.com
File Name: QUANTAXIS/QAARP/QAAccount.py
Class Name: QA_Account
Method Name: daily_hold


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 38a07735faccfe4530860f1a967e195bc70b739c
Time: 2019-04-01
Author: 40067351+zsl3034669@users.noreply.github.com
File Name: QUANTAXIS/QAARP/QAAccount.py
Class Name: QA_Account
Method Name: daily_cash