99b30e66a481b9a255f74adc6895dcd541d670f0,numerox/prediction.py,Prediction,rename,#Prediction#Any#,42

Before Change


        if self.df is None:
            raise ValueError("Cannot rename an empty prediction")
        if nx.isstring(mapper):
            if self.shape[1] != 1:
                raise ValueError("prediction must contain a single name")
            mapper = {self.names[0]: mapper}
        df = self.df.rename(columns=mapper, copy=True)
        return Prediction(df)

After Change


                raise ValueError(msg)
            pairs = self.pairs(as_str=False)
            pairs = [(mapper, t) for n, t in pairs]
            df = self.df.copy()
            df.columns = pairs
        elif isinstance(mapper, dict):
            pairs = self.pairs(as_str=False)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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: 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: 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__