class_docstr: Label Encoder that groups infrequent values into one label.
  
  Code from https://github.com/jeongyoonlee/Kaggler/blob/master/kaggler/preprocessing/data.py
  
  Attributes:
      min_obs (int): minimum number of observation to assign a label.
      label_encoders (list of dict): label encoders for columns
      label_maxes (list of int): maximum of labels for columns
docstr: Encode categorical columns into label encoded columns
  
  Args:
      X (pandas.DataFrame): categorical columns to encode
  
  Returns:
      X (pandas.DataFrame): label encoded columns
docstr_tok: ["Encode","categorical","columns","into","label","encoded","columns","Args",":","X","(","pandas.DataFrame",")",":","categorical","columns","to","encode","Returns",":","X","(","pandas.DataFrame",")",":","label","encoded","columns"]
code: def transform(self, X):
      """Encode categorical columns into label encoded columns
  
      Args:
          X (pandas.DataFrame): categorical columns to encode
  
      Returns:
          X (pandas.DataFrame): label encoded columns
      """
  
      for i, col in enumerate(X.columns):
          X.loc[:, col] = self._transform_col(X[col], i)
  
      return 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 LabelEncoder obj's underlying member method code with example usage: obj.transform(X) and returns: X