99095d5412483ec623278bdb1a0c9e24b18bfc85,pdpipe/basic_stages.py,ColDrop,__init__,#ColDrop#,50

Before Change


    DEF_COLDROP_APPLY_MSG = "Dropping columns {}..."

    def __init__(self, columns, exraise=True):
        self._columns = _interpret_columns_param(columns, "columns")
        super(ColDrop, self).__init__(
            exraise=exraise,
            exmsg=ColDrop.DEF_COLDROP_EXC_MSG.format(self._columns),
            appmsg=ColDrop.DEF_COLDROP_APPLY_MSG.format(self._columns)
        )

    def _prec(self, df):
        return set(self._columns).issubset(df.columns)

After Change


        return "Drop column{} {}".format(
            "s" if len(self._columns) > 1 else "", self._columns_str)

    def __init__(self, columns, **kwargs):
        self._columns = columns
        self._columns_str = _list_str(self._columns)
        if not callable(columns):
            self._columns = _interpret_columns_param(columns, "columns")
        super_kwargs = {
            "exmsg": ColDrop._DEF_COLDROP_EXC_MSG.format(self._columns_str),
            "appmsg": ColDrop._DEF_COLDROP_APPLY_MSG.format(self._columns_str),
            "desc": self._default_desc()
        }
        super_kwargs.update(**kwargs)
        super().__init__(**super_kwargs)

    def _prec(self, df):
        if callable(self._columns):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: shaypal5/pdpipe
Commit Name: 99095d5412483ec623278bdb1a0c9e24b18bfc85
Time: 2017-03-16
Author: shaypal5@gmail.com
File Name: pdpipe/basic_stages.py
Class Name: ColDrop
Method Name: __init__


Project Name: shaypal5/pdpipe
Commit Name: 99095d5412483ec623278bdb1a0c9e24b18bfc85
Time: 2017-03-16
Author: shaypal5@gmail.com
File Name: pdpipe/basic_stages.py
Class Name: ColDrop
Method Name: __init__


Project Name: shaypal5/pdpipe
Commit Name: 99095d5412483ec623278bdb1a0c9e24b18bfc85
Time: 2017-03-16
Author: shaypal5@gmail.com
File Name: pdpipe/basic_stages.py
Class Name: ValKeep
Method Name: __init__


Project Name: shaypal5/pdpipe
Commit Name: 99095d5412483ec623278bdb1a0c9e24b18bfc85
Time: 2017-03-16
Author: shaypal5@gmail.com
File Name: pdpipe/basic_stages.py
Class Name: ValDrop
Method Name: __init__