code: def transform(self, input_df):
          
  
          # Shallow copy the dataframe (we'll be making changes to some columns)
          _df = input_df.copy(deep=False)
  
          # Convert all columns that are/should be categorical
          for column in self.cat_columns:
  
              # Sanity check
              if column not in _df:
                  raise RuntimeError('Required column {:s} not found'.format(column))
  
              # If the column isn't already a category then change it
              if _df[column].dtype == 'object':
                  print('Changing column {:s} to category'.format(column))
                  _df[column] = pd.Categorical(_df[column])
  
          # Remove any columns that aren't bool/int/float/category
          _df = _df.select_dtypes(include=['bool', 'int', 'float', 'category'])
  
          # Normalize any numeric columns if normalize specified
          if self.normalize:
              for column in list(_df.select_dtypes(include=[np.number]).columns.values):
                  print('Normalizing column {:s}...'.format(column))
                  smin, smax = self.norm_map[column]
                  _df[column] = (_df[column] - smin) / (smax - smin)
  
          # Now that categorical columns are setup call the dummy_encoder
          return self.dummy_encoder.transform(_df)
docs: Convert the dataframe to a matrix (numpy ndarray)
          Args:
              input_df (dataframe): The dataframe to convert