code: def transform(self, X, y=None):
      ignore_none_fields = False
      if self.get("transformed_column_descriptions", None) is not None:
          ignore_none_fields = True
      column_descriptions = self.get(
          "transformed_column_descriptions", self.column_descriptions
      )
  
      # Convert input to DataFrame if we were given a list of dictionaries
      if isinstance(X, list):
          X = pd.DataFrame(X)
      X = X.copy()
  
      # All of these are values we will not want to keep for training this particular estimator.
      # Note that we have already split out the output column and saved it into it's own variable
  
      if isinstance(X, dict):
          dict_copy = {}
  
          for key, val in X.items():
              col_desc = column_descriptions.get(key, None)
  
              if col_desc is None:
                  continue
              elif col_desc in (
                  None,
                  "continuous",
                  "numerical",
                  "float",
                  "int",
              ):
                  dict_copy[key] = clean_val_nan_version(
                      key, val, replacement_val=0
                  )
              elif col_desc == "date":
                  date_feature_dict = add_date_features_dict(X, key)
                  dict_copy.update(date_feature_dict)
              elif col_desc == "categorical":
                  dict_copy[key] = val
              elif key in self.text_columns:
                  col_names = self.text_columns[
                      key
                  ].cleaned_feature_names
  
                  try:
                      text_val = str(X[key])
                  except UnicodeEncodeError:
                      text_val = (
                          X[key]
                          .encode("ascii", "ignore")
                          .decode("ascii")
                      )
  
                  # the transform function expects a list
                  text_val = [text_val]
  
                  nlp_matrix = self.text_columns[key].transform(
                      text_val
                  )
  
                  # From here, it's all about transforming the output from the tf-idf transform into a dictionary
                  # Borrowed from: http://stackoverflow.com/a/40696119/3823857
                  # it outputs a sparse csr matrics
                  # first, we transform to coo
                  nlp_matrix = nlp_matrix.tocoo()
                  # Then, we grab the relevant column names
                  relevant_col_names = []
                  for col_idx in nlp_matrix.col:
                      relevant_col_names.append(col_names[col_idx])
  
                  # Then we zip together the relevant columns and the sparse data into a dictionary
                  relevant_nlp_cols = {
                      k: v
                      for k, v in zip(
                          relevant_col_names, nlp_matrix.data
                      )
                  }
  
                  dict_copy.update(relevant_nlp_cols)
  
              else:
                  pass
          return dict_copy
  
      else:
          X.reset_index(drop=True, inplace=True)
  
          # Run data cleaning only for columns that are not already pandas numeric dtypes
          cols_to_clean = []
          dtypes = X.dtypes
          for idx, col in enumerate(X.columns):
              if dtypes[idx] not in self.numeric_col_types:
                  cols_to_clean.append(col)
  
          if len(cols_to_clean) > 0:
              df_to_clean = X[cols_to_clean]
              X.drop(cols_to_clean, axis=1, inplace=True)
  
              if (
                  df_to_clean.shape[0] > 100000
                  or os.environ.get("is_test_suite", 0) == "True"
              ):
                  results = list(
                      map(
                          lambda col: self.process_one_column(
                              col_vals=df_to_clean[col], col_name=col
                          ),
                          df_to_clean.columns,
                      )
                  )
              else:
                  pool = pathos.multiprocessing.ProcessPool()
                  try:
                      pool.restart()
                  except AssertionError as e:
                      pass
  
                  results = list(
                      pool.map(
                          lambda col: self.process_one_column(
                              col_vals=df_to_clean[col], col_name=col
                          ),
                          df_to_clean.columns,
                      )
                  )
                  pool.close()
                  try:
                      pool.join()
                  except AssertionError:
                      pass
  
              result = {}
              for val in results:
                  result.update(val)
                  del val
              df_result = pd.DataFrame(result)
              X[df_result.columns] = df_result
  
          return X
  
imports: import datetime
  import os
  import dateutil
  import numpy
  import pandas
  from pandas import __version__
  import pathos
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.feature_extraction.text import TfidfVectorizer
  import warnings
label_desc: Use image node_id 4 for calling the BasicDataCleaning obj's underlying member method code with example usage: obj.transform(X, y) and returns: dict_copy, X