de831768952b9676e25d433044f9a34a381e9390,numerox/report.py,,load_report,#Any#Any#Any#,18

Before Change


    // load prediction objects
    original_dir = os.getcwd()
    os.chdir(prediction_dir)
    dfs = []
    try:
        for filename in glob.glob("*{}".format(extension)):
            prediction = load_prediction(filename)
            df = prediction.df
            model = filename[:-len(extension)]
            df.rename(columns={"yhat": model}, inplace=True)
            dfs.append(df)
    finally:
        os.chdir(original_dir)

    // concatenate predictions
    df = pd.concat(dfs, axis=1, verify_integrity=True, copy=False)

    // add in era, region, and y info
    ery = data.df[["era", "region", "y"]]
    df = pd.merge(ery, df, left_index=True, right_index=True, how="right")

After Change


    "Load Prediction objects (hdf) in `prediction_dir`; return Report object"
    original_dir = os.getcwd()
    os.chdir(prediction_dir)
    predictions = {}
    try:
        for filename in glob.glob("*{}".format(extension)):
            prediction = load_prediction(filename)
            model = filename[:-len(extension) - 1]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: kwgoodman/numerox
Commit Name: de831768952b9676e25d433044f9a34a381e9390
Time: 2017-11-04
Author: kwgoodman@gmail.com
File Name: numerox/report.py
Class Name:
Method Name: load_report


Project Name: tensorflow/lattice
Commit Name: 1c75176947730de8322acf6ad996096625e92e3a
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_lattice/python/rtl_layer.py
Class Name: RTL
Method Name: call


Project Name: bambinos/bambi
Commit Name: c58c67e38deee612ba244f719b82780aa3928158
Time: 2016-08-28
Author: tyarkoni@gmail.com
File Name: bambi/models.py
Class Name: Model
Method Name: build