99095d5412483ec623278bdb1a0c9e24b18bfc85,pdpipe/basic_stages.py,Bin,_op,#Bin#Any#Any#,324
Before Change
if verbose:
colnames = tqdm.tqdm(colnames)
for colname in colnames:
assign_map[colname+"_binned"] = df[colname].apply(
self._get_col_binner(self._bin_map[colname]))
inter_df = df.assign(**assign_map)
if self._drop:
After Change
if verbose:
colnames.set_description(colname)
source_col = df[colname]
loc = df.columns.get_loc(colname) + 1
new_name = colname + "_bin"
if self._drop:
inter_df = inter_df.drop(colname, axis=1)
new_name = colname
loc -= 1
inter_df = out_of_place_col_insert(
df=inter_df,
series=source_col.apply(
self._get_col_binner(self._bin_map[colname])),
loc=loc,
column_name=new_name)
return inter_df
class Binarize(PipelineStage):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
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: _op
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: _op
Project Name: shaypal5/pdpipe
Commit Name: 99095d5412483ec623278bdb1a0c9e24b18bfc85
Time: 2017-03-16
Author: shaypal5@gmail.com
File Name: pdpipe/basic_stages.py
Class Name: MapColVals
Method Name: _op