docstr: :param data: unencoded input dataframe
  :return: a dict with encoded values
code: def encode_x(self, data):
      """
      :param data: unencoded input dataframe
      :return: a dict with encoded values
      """
      encoded = OrderedDict()
      if self.multiprocessing:
          pool = multiprocessing.Pool(self.workers)
          results = []
          for encoder in self.encoders:
              results.append(
                  (
                      encoder,
                      pool.apply_async(self.transform, (encoder, data)),
                  )
              )
  
          for encoder, result in results:
              self.merged_transformed(encoded, encoder, result.get())
  
      else:
          for encoder in self.encoders:
              self.merged_transformed(
                  encoded,
                  encoder,
                  self.transform(encoder, data),
                  append_twin=False,
              )
              if encoder.twin:
                  self.merged_transformed(
                      encoded,
                      encoder,
                      self.transform(encoder, data, append_twin=True),
                      append_twin=True,
                  )
  
      for column in self.index:
          encoded[column] = self.read_column(data, column)
  
      # Using a DataFrame as a container temporarily requires double the memory,
      # as pandas copies all data on __init__. This is justified by having a
      # type supported by all dependent libraries (heterogeneous dict is not)
      dataframe = pandas.DataFrame(encoded)
      if self.index:
          dataframe.set_index(self.index)
      return dataframe
  
imports: from __future__ import absolute_import
  from abc import ABCMeta, abstractmethod
  from collections import OrderedDict, Iterable
  import gc
  import logging
  import multiprocessing
  import lore
  from lore.env import require
  from lore.util import timer, timed
  from lore.pipelines import Observations
  import numpy
  import pandas
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 16 for calling the Base obj's underlying member method code with example usage: obj.encode_x(data) and returns: dataframe