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
code: def fit(self, X, y=None):
      self.label_encoders = [None] * X.shape[1]
      self.label_maxes = [None] * X.shape[1]
  
      for i, col in enumerate(X.columns):
          (
              self.label_encoders[i],
              self.label_maxes[i],
          ) = self._get_label_encoder_and_max(X[col])
  
      return self
  
imports: import logging
  import numpy
  import pandas
  from scipy import sparse
  from sklearn import base
label_desc: Use image node_id 5 for calling the LabelEncoder obj's underlying member method code with example usage: obj.fit(X, y) and returns: self