31f768dd2cd555649d2b0e494935cb37cf223142,category_encoders/one_hot.py,OneHotEncoder,reverse_dummies,#OneHotEncoder#Any#Any#,360

Before Change



        
        out_cols = X.columns.values
        cols = []
        mapped_columns = []
        for switch in mapping:
            col = switch.get("col")
            mod = switch.get("mapping")
            cols.append(col)

            X[col] = 0
            positive_indexes = mod.index[mod.index > 0]
            for i in range(positive_indexes.shape[0]):

After Change


            mod = switch.get("mapping")
            insert_at = out_cols.index(mod.columns[0])

            X.insert(insert_at, col, 0)
            positive_indexes = mod.index[mod.index > 0]
            for i in range(positive_indexes.shape[0]):
                existing_col = mod.columns[i]
                val = positive_indexes[i]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 31f768dd2cd555649d2b0e494935cb37cf223142
Time: 2019-03-22
Author: datarian@againstthecurrent.ch
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: reverse_dummies


Project Name: graphbrain/graphbrain
Commit Name: 2dd592e4197d2272d214e945ec19201eac78a9e9
Time: 2016-10-21
Author: telmo@telmomenezes.net
File Name: gb/knowledge/semantic_tree.py
Class Name: Node
Method Name: append_to_root


Project Name: tyarkoni/pliers
Commit Name: 51c953965cfec248402d25e64d28eb888ee1d00c
Time: 2018-01-19
Author: tyarkoni@gmail.com
File Name: pliers/extractors/image.py
Class Name: FaceRecognitionFaceLandmarksExtractor
Method Name: _to_df


Project Name: dask/dask-image
Commit Name: 9982ea13b8562996047c96381e96fbc720973fee
Time: 2018-06-18
Author: jakirkham@gmail.com
File Name: docs/conf.py
Class Name:
Method Name: run_apidoc