code: def one_hot_code(df1, sens_dict):
      cols = df1.columns
      for c in cols:
          if isinstance(df1[c][0], str):
              column = df1[c]
              df1 = df1.drop(c, 1)
              unique_values = list(set(column))
              n = len(unique_values)
              if n > 2:
                  for i in range(n):
                      col_name = "{}.{}".format(c, i)
                      col_i = [
                          1 if el == unique_values[i] else 0
                          for el in column
                      ]
                      df1[col_name] = col_i
                      sens_dict[col_name] = sens_dict[c]
                  del sens_dict[c]
              else:
                  col_name = c
                  col = [
                      1 if el == unique_values[0] else 0
                      for el in column
                  ]
                  df1[col_name] = col
      return df1, sens_dict
  
file_path: AIF360/aif360/algorithms/inprocessing/gerryfair/clean.py
imports: import argparse
  import numpy
  import pandas
label_desc: Use image node_id 5 for calling a global function with example usage: one_hot_code(df1, sens_dict) and returns: df1,  sens_dict