99095d5412483ec623278bdb1a0c9e24b18bfc85,pdpipe/basic_stages.py,Bin,__init__,#Bin#,291
Before Change
DEF_BIN_APP_MSG = "Binning columns {}..."
def __init__(self, bin_map, drop=True, exraise=True):
super(Bin, self).__init__(
exraise=exraise,
exmsg=Bin.DEF_BIN_EXC_MSG.format(
list(bin_map.keys())),
appmsg=Bin.DEF_BIN_APP_MSG.format(
list(bin_map.keys()))
)
self._bin_map = bin_map
self._drop = drop
def _prec(self, df):
After Change
def __init__(self, bin_map, drop=True, **kwargs):
self._bin_map = bin_map
self._drop = drop
columns_str = _list_str(list(bin_map.keys()))
super_kwargs = {
"exmsg": Bin._DEF_BIN_EXC_MSG.format(columns_str),
"appmsg": Bin._DEF_BIN_APP_MSG.format(
"s" if len(bin_map) > 1 else "", columns_str),
"desc": self._default_desc()
}
super_kwargs.update(**kwargs)
super().__init__(**super_kwargs)
def _prec(self, df):
return set(self._bin_map.keys()).issubset(df.columns)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: shaypal5/pdpipe
Commit Name: 99095d5412483ec623278bdb1a0c9e24b18bfc85
Time: 2017-03-16
Author: shaypal5@gmail.com
File Name: pdpipe/basic_stages.py
Class Name: Bin
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: Encode
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: Bin
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: ColRename
Method Name: __init__