code: def init_encoder(
      data,
  ):
      label_encoders = dict()
  
      for name in data.columns.values:
          if np.issubdtype(
              data.dtypes[name], np.object_
          ) or np.issubdtype(data.dtypes[name], np.signedinteger):
              label_encoders[name] = LabelEncoder()
              label_encoders[name].fit(data[name])
  
      return label_encoders
  
file_path: AIX360/aix360/algorithms/rule_induction/ripper/base.py
imports: import sys
  import numpy
  from pandas import DataFrame
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import LabelEncoder
  from aix360.algorithms.rule_induction.ripper.binding import EQ, LE, GE
label_desc: Use image node_id 2 for calling a global function with example usage: init_encoder(data) and returns: label_encoders