Exemple #1
0
 def __init__(
     self, columns=None, exclude_columns=None, drop=True, **kwargs
 ):
     self._drop = drop
     self.encoders = {}
     super_kwargs = {
         'columns': columns,
         'exclude_columns': exclude_columns,
         'desc_temp': "Encode {}",
     }
     super_kwargs.update(**kwargs)
     super_kwargs['none_columns'] = OfDtypes(['object', 'category'])
     super().__init__(**super_kwargs)
Exemple #2
0
 def __init__(self, scaler, columns=None, exclude_columns=None, **kwargs):
     self.scaler = scaler
     self._kwargs = kwargs
     super_kwargs = {
         'columns': columns,
         'exclude_columns': exclude_columns,
         'desc_temp': "Scale columns {}",
     }
     valid_super_kwargs = super()._init_kwargs()
     for key in kwargs:
         if key in valid_super_kwargs:
             super_kwargs[key] = kwargs[key]
     super_kwargs['none_columns'] = OfDtypes([np.number])
     super().__init__(**super_kwargs)
 def __init__(self,
              columns=None,
              exclude_columns=None,
              drop=False,
              non_neg=False,
              const_shift=None,
              **kwargs):
     self._drop = drop
     self._non_neg = non_neg
     self._const_shift = const_shift
     self._col_to_minval = {}
     super_kwargs = {
         'columns': columns,
         'exclude_columns': exclude_columns,
         'desc_temp': "Log-transform {}",
     }
     super_kwargs.update(**kwargs)
     super_kwargs['none_columns'] = OfDtypes([np.number])
     super().__init__(**super_kwargs)
 def __init__(self,
              columns=None,
              dummy_na=False,
              exclude_columns=None,
              drop_first=True,
              drop=True,
              **kwargs):
     self._dummy_na = dummy_na
     self._drop_first = drop_first
     self._drop = drop
     self._dummy_col_map = {}
     self._encoder_map = {}
     super_kwargs = {
         'columns': columns,
         'exclude_columns': exclude_columns,
         'desc_temp': "One-hot encode {}",
     }
     super_kwargs.update(**kwargs)
     super_kwargs['none_columns'] = OfDtypes(['object', 'category'])
     super().__init__(**super_kwargs)