90e0379c7987aa0c6aa4703da8fe6041f8705edb,category_encoders/ordinal.py,OrdinalEncoder,ordinal_encoding,#,237

Before Change



                categories_dict = {x: i + 1 for i, x in enumerate(categories)}

                mapping_out.append({"col": col, "mapping": [(x[1], x[0] + 1) for x in list(enumerate(categories))],
                                    "data_type": X[col].dtype}, )

        return X, mapping_out

After Change



                categories_dict = {x: i + 1 for i, x in enumerate(categories)}

                mapping_out.append({"col": col, "mapping": list(categories_dict.items()), "data_type": X[col].dtype}, )

        return X, mapping_out
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 90e0379c7987aa0c6aa4703da8fe6041f8705edb
Time: 2018-10-18
Author: jcastaldo08@gmail.com
File Name: category_encoders/ordinal.py
Class Name: OrdinalEncoder
Method Name: ordinal_encoding


Project Name: arogozhnikov/einops
Commit Name: 3244bdf76f1a7aafff39df990913946d565e790f
Time: 2020-05-22
Author: iamfullofspam@gmail.com
File Name: einops/einops.py
Class Name: TransformRecipe
Method Name: reconstruct_from_shape


Project Name: arogozhnikov/einops
Commit Name: e89370c2cf1ef9c7f97246b7cfc1de2c73c8c565
Time: 2020-05-23
Author: iamfullofspam@gmail.com
File Name: einops/einops.py
Class Name: TransformRecipe
Method Name: reconstruct_from_shape