9da9c8edd24bede6eeeeea8739835ea53ca58cbc,category_encoders/one_hot.py,OneHotEncoder,reverse_dummies,#OneHotEncoder#,293

Before Change



        X = X.reindex(columns=out_cols + cols)

        return X

After Change



            X[col] = 0
            for column_mapping in mod:
                existing_col = column_mapping.get("new_col_name")
                val = column_mapping.get("val")
                X.loc[X[existing_col] == 1, col] = val
                mapped_columns.append(existing_col)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 9da9c8edd24bede6eeeeea8739835ea53ca58cbc
Time: 2018-10-21
Author: jcastaldo08@gmail.com
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: reverse_dummies


Project Name: chakki-works/doccano
Commit Name: 8222ea602261df413882b28944386b4e30cc8cf1
Time: 2019-10-18
Author: clewolff@microsoft.com
File Name: app/api/serializers.py
Class Name: LabelSerializer
Method Name: validate


Project Name: explosion/spaCy
Commit Name: 4fa96705379b10b761a7097b1adb12145402cb1f
Time: 2020-05-20
Author: adrianeboyd@gmail.com
File Name: spacy/lemmatizer.py
Class Name: Lemmatizer
Method Name: __call__


Project Name: nilmtk/nilmtk
Commit Name: 2660795b041907479e27fd2a7b0398f76a56a9a2
Time: 2014-11-05
Author: jack-list@xlk.org.uk
File Name: nilmtk/appliance.py
Class Name: Appliance
Method Name: label


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 9da9c8edd24bede6eeeeea8739835ea53ca58cbc
Time: 2018-10-21
Author: jcastaldo08@gmail.com
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: reverse_dummies