68c9bab4a5c6821c2a4395763c676ba796406c49,dask_ml/preprocessing/_encoders.py,OneHotEncoder,_transform,#OneHotEncoder#Any#Any#,220

Before Change


            import dask.dataframe as dd

            // Validate that all are categorical.
            if not (X.dtypes == "category").all():
                raise ValueError("Must be all categorical.")

            if not len(X.columns) == len(self.categories_):
                raise ValueError(
                    "Number of columns ({}) does not match number "
                    "of categories_ ({})".format(len(X.columns), len(self.categories_))

After Change


        else:
            import dask.dataframe as dd

            X = X.copy()

            if not len(X.columns) == len(self.categories_):
                raise ValueError(
                    "Number of columns ({}) does not match number "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: dask/dask-ml
Commit Name: 68c9bab4a5c6821c2a4395763c676ba796406c49
Time: 2020-08-17
Author: TomAugspurger@users.noreply.github.com
File Name: dask_ml/preprocessing/_encoders.py
Class Name: OneHotEncoder
Method Name: _transform


Project Name: kwgoodman/numerox
Commit Name: 99b30e66a481b9a255f74adc6895dcd541d670f0
Time: 2018-08-31
Author: kwgoodman@gmail.com
File Name: numerox/prediction.py
Class Name: Prediction
Method Name: rename


Project Name: scipy/scipy
Commit Name: 4da67c44d8f487a616f0898daa6b40c4a5a73519
Time: 2018-06-30
Author: adibhar97@gmail.com
File Name: scipy/spatial/transform/rotation.py
Class Name: Rotation
Method Name: __init__


Project Name: tensorflow/hub
Commit Name: 81092be4e1e900473cd008fec50dc49c8af2eed9
Time: 2019-10-29
Author: no-reply@google.com
File Name: tensorflow_hub/keras_layer.py
Class Name: KerasLayer
Method Name: call