class_docstr: One-Hot-Encoder that groups infrequent values into one dummy variable.
  
  Code from https://github.com/jeongyoonlee/Kaggler/blob/master/kaggler/preprocessing/data.py
  
  Attributes:
      min_obs (int): minimum number of observation to create a dummy variable
      label_encoders (list of (dict, int)): label encoders and their maximums
                                            for columns
docstr: Encode categorical columns into sparse matrix with one-hot-encoding.
  
  Args:
      X (pandas.DataFrame): categorical columns to encode
  
  Returns:
      sparse matrix encoding categorical variables into dummy variables
docstr_tok: ["Encode","categorical","columns","into","sparse","matrix","with","one-hot-encoding",".","Args",":","X","(","pandas.DataFrame",")",":","categorical","columns","to","encode","Returns",":","sparse","matrix","encoding","categorical","variables","into","dummy","variables"]
code: def fit_transform(self, X, y=None):
      """Encode categorical columns into sparse matrix with one-hot-encoding.
  
      Args:
          X (pandas.DataFrame): categorical columns to encode
  
      Returns:
          sparse matrix encoding categorical variables into dummy variables
      """
  
      self.label_encoder.fit(X)
  
      return self.transform(X)
  
imports: import logging
  import numpy
  import pandas
  from scipy import sparse
  from sklearn import base
label_desc: Use image node_id 6 for calling the OneHotEncoder obj's underlying member method code with example usage: obj.fit_transform(X, y) and returns: self