e547a82c24b37c157bc9b40d2724a7b1fd0a7b0f,cesium/featurize.py,,load_featureset,#,367

Before Change


    channels = [int(c) if c != "" else "" for c in data.pop("channels")]
    columns = pd.MultiIndex.from_tuples(list(zip(features, channels)),
                                        names=["feature", "channel"])
    fset = pd.DataFrame(data.pop("values"), index=data.pop("index"),
                        columns=columns)
    return fset, data

After Change


    fset.columns = pd.MultiIndex.from_tuples(list(zip(features, channels)),
                                             names=["feature", "channel"])

    for k, v in data.items():
        if len(v.dtype) > 0:
            data[k] = pd.DataFrame.from_records(v, index="index")

    return fset, data
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: cesium-ml/cesium
Commit Name: e547a82c24b37c157bc9b40d2724a7b1fd0a7b0f
Time: 2017-04-17
Author: brettnaul@gmail.com
File Name: cesium/featurize.py
Class Name:
Method Name: load_featureset


Project Name: nilmtk/nilmtk
Commit Name: 69ba1cbf23b39f6511ebeb2c22eec0e44068d1cb
Time: 2014-12-15
Author: nipunreddevil@gmail.com
File Name: nilmtk/dataset_converters/combed/convert_combed.py
Class Name:
Method Name: convert_combed


Project Name: luispedro/mahotas
Commit Name: 64624fb2b46a228fef1141e1ded84e52acccaf6e
Time: 2015-06-09
Author: luis@luispedro.org
File Name: bin/mahotas-features.py
Class Name:
Method Name: main