9da9c8edd24bede6eeeeea8739835ea53ca58cbc,category_encoders/one_hot.py,OneHotEncoder,reverse_dummies,#OneHotEncoder#,293
Before Change
val = tran_col[prefix_length:]
X.loc[X[tran_col] == 1, col] = val
else:
value_array = np.array([int(col0[prefix_length:]) for col0 in col_list])
X[col] = np.dot(X[col_list].values, value_array.T)
out_cols = [col0 for col0 in out_cols if col0 not in col_list]
X = X.reindex(columns=out_cols + cols)
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)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: Esri/raster-functions
Commit Name: ed40bb91d35448ad265d1763f58e479739b881e3
Time: 2014-09-07
Author: akferoz@esri.com
File Name: NDVI.py
Class Name: NDVI
Method Name: getConfiguration
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: theislab/scanpy
Commit Name: 37ef2c69f22a6e2d1232782dd3e192a003731a75
Time: 2020-11-25
Author: michal.klein@protonmail.com
File Name: scanpy/readwrite.py
Class Name:
Method Name: _download