code: def preprocess(
      self,
      df: DataFrame,
      categorical_fields: Optional[List[str]] = None,
      numerical_fields: Optional[List[str]] = None,
      parameters: Dict[str, Any] = None,
  ):
      if self.training:
          categorical_fields, numerical_fields = self._sanetize_fields(
              categorical_fields, numerical_fields
          )
          parameters = self.compute_parameters(
              df, numerical_fields, categorical_fields
          )
      elif parameters is None:
          raise ValueError(
              "Loading tabular data for evaluation or inference requires parameters from the train data. Either "
              "construct the train data at the same time as evaluation and inference or provide the train "
              "`datamodule.parameters` in the `parameters` argument."
          )
  
      self.parameters = parameters
  
      # impute and normalize data
      df = _pre_transform(
          df,
          parameters["numerical_fields"],
          parameters["categorical_fields"],
          parameters["codes"],
          parameters["mean"],
          parameters["std"],
      )
  
      cat_vars = _to_cat_vars_numpy(
          df, parameters["categorical_fields"]
      )
      num_vars = _to_num_vars_numpy(df, parameters["numerical_fields"])
  
      num_samples = len(df)
      cat_vars = (
          np.stack(cat_vars, 1)
          if len(cat_vars)
          else np.zeros((num_samples, 0), dtype=np.int64)
      )
      num_vars = (
          np.stack(num_vars, 1)
          if len(num_vars)
          else np.zeros((num_samples, 0), dtype=np.float32)
      )
  
      return cat_vars, num_vars
  
file_path: lightning-flash/src/flash/tabular/input.py
imports: from io import StringIO
  from typing import Any, Dict, List, Optional, Union
  import numpy
  from flash.core.data.io.input import DataKeys, Input, ServeInput
  from flash.core.utilities.imports import _PANDAS_AVAILABLE
  from flash.tabular.classification.utils import _compute_normalization, _generate_codes, _pre_transform, _to_cat_vars_numpy, _to_num_vars_numpy
label_desc: Use image node_id 3 for calling the TabularDataFrameInput obj's underlying member method code with example usage: obj.preprocess(df, categorical_fields, numerical_fields, parameters) and returns: cat_vars,  num_vars