code: def _transform_data(self, X):
          
  
          if self._binarizers == []:
              raise NotFittedError()
  
          if self.binarize is not None:
              X = binarize(X, threshold=self.binarize)
  
          if len(self._binarizers) != X.shape[1]:
              raise ValueError(
                  "Expected input with %d features, got %d instead" %
                  (len(self._binarizers), X.shape[1]))
  
          X_parts = []
  
          for i in range(X.shape[1]):
  
              X_i = self._binarizers[i].transform(X[:, i])
  
              # sklearn returns ndarray with shape (samples, 1) on binary input.
              if self._binarizers[i].classes_.shape[0] == 2:
                  X_parts.append(1 - X_i)
  
              X_parts.append(X_i)
  
          return np.concatenate(X_parts, axis=1)
docs: Binarize the data for each column separately.