class_docstr: Preprocess one multimodal pd.DataFrame including image paths, image bytearrays, texts, numerical features,
  and categorical features. Each modality may have multiple columns.
  The preprocessor is designed to output model-agnostic features.
class_docstr_tok: ["Preprocess","one","multimodal","pd.DataFrame","including","image","paths",",","image","bytearrays",",","texts",",","numerical","features",",","and","categorical","features",".","Each","modality","may","have","multiple","columns",".","The","preprocessor","is","designed","to","output","model-agnostic","features","."]
docstr: Preprocess text data by collecting them together. May need to format
  the categorical and numerical data into strings if using them so.
  This function needs to be called preceding the text processor in "process_text.py".
  
  Parameters
  ----------
  df
      The multimodal pd.DataFrame.
  
  Returns
  -------
  text_features
      All the text data stored in a dictionary.
  text_types
      The column types of these text data, e.g., text or text_identifier.
code: def transform_text(
      self,
      df: pd.DataFrame,
  ) -> Tuple[Dict[str, List[str]], Dict[str, str]]:
      """
      Preprocess text data by collecting them together. May need to format
      the categorical and numerical data into strings if using them so.
      This function needs to be called preceding the text processor in "process_text.py".
  
      Parameters
      ----------
      df
          The multimodal pd.DataFrame.
  
      Returns
      -------
      text_features
          All the text data stored in a dictionary.
      text_types
          The column types of these text data, e.g., text or text_identifier.
      """
      assert (
          self._fit_called or self._fit_x_called
      ), "You will need to first call preprocessor.fit_x() before calling preprocessor.transform_text."
      text_features = {}
      text_types = {}
      for col_name in self._text_feature_names:
          col_value = df[col_name]
          col_type = self._column_types[col_name]
          if col_type == TEXT or col_type == CATEGORICAL:
              # TODO: do we need to consider whether categorical values are valid text?
              col_value = col_value.astype("object")
              processed_data = col_value.apply(
                  lambda ele: "" if pd.isnull(ele) else str(ele)
              )
          elif col_type == NUMERICAL:
              processed_data = pd.to_numeric(col_value).apply(
                  "{:.3f}".format
              )
          elif col_type == f"{TEXT}_{IDENTIFIER}":
              processed_data = col_value
          else:
              raise ValueError(
                  f"Column {col_name} has type {col_type}, which can't be converted to text."
              )
  
          text_features[col_name] = processed_data.values.tolist()
          text_types[col_name] = col_type
  
      return text_features, text_types
  
imports: import logging
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from nptyping import NDArray
  from omegaconf import DictConfig, OmegaConf
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.impute import SimpleImputer
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import MinMaxScaler, StandardScaler
  from autogluon.features import CategoryFeatureGenerator
  from ..constants import AUTOMM, CATEGORICAL, DOCUMENT, DOCUMENT_IMAGE, IDENTIFIER, IMAGE, IMAGE_BYTEARRAY, IMAGE_PATH, LABEL, NER, NER_ANNOTATION, NULL, NUMERICAL, OVD, ROIS, SEMANTIC_SEGMENTATION, SEMANTIC_SEGMENTATION_GT, SEMANTIC_SEGMENTATION_IMG, TEXT, TEXT_NER
  from .label_encoder import CustomLabelEncoder
label_desc: Use image node_id 28 for calling the MultiModalFeaturePreprocessor obj's underlying member method code with example usage: obj.transform_text(df) and returns: text_features,  text_types