docstr: Input:
  data : dataframe or x_test
  Column Transformer: Sklearn ColumnTransformer that applies transformers to columns of an array or pandas DataFrame.
  
  Returns:
  Column Transformer function after fit. 
docstr_tok: ["Input",":","data",":","dataframe","or","x_test","Column","Transformer",":","Sklearn","ColumnTransformer","that","applies","transformers","to","columns","of","an","array","or","pandas","DataFrame",".","Returns",":","Column","Transformer","function","after","fit","."]
code: def inbuiltColumnsTransformer(data):
      """
      Input:
      data : dataframe or x_test
      Column Transformer: Sklearn ColumnTransformer that applies transformers to columns of an array or pandas DataFrame.
  
      Returns:
      Column Transformer function after fit.
      """
      from sklearn.pipeline import Pipeline
      from sklearn.preprocessing import (
          StandardScaler,
          OneHotEncoder,
          FunctionTransformer,
      )
      from sklearn.compose import ColumnTransformer
  
      category_cols, numerical_cols = ModelProcessor.num_cat_variables(
          data
      )
      category_map = ModelProcessor.gen_category_map(
          data, category_cols
      )
  
      ordinal_features = [
          x
          for x in range(len(data.columns))
          if x not in list(category_map.keys())
      ]
      ordinal_transformer = Pipeline(
          steps=[
              ("imputer", SimpleImputer(strategy="median")),
              ("scaler", StandardScaler()),
          ]
      )
  
      categorical_features = list(category_map.keys())
      categorical_transformer = Pipeline(
          steps=[
              ("imputer", SimpleImputer(strategy="most_frequent")),
              (
                  "onehot",
                  OneHotEncoder(drop="first", handle_unknown="error"),
              ),
          ]
      )
  
      # pass the pipeline into the transformer
      preprocessor = ColumnTransformer(
          transformers=[
              ("num", ordinal_transformer, ordinal_features),
              ("cat", categorical_transformer, categorical_features),
          ]
      )
      # preprocessor.fit(data)
      return preprocessor
  
file_path: explainx/lib/models/modelprocessor.py
imports: from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
  import numpy
  import pandas
  from sklearn.preprocessing import LabelEncoder
  from typing import Dict, List, Union
  from sklearn.impute import SimpleImputer
  from explainx.lib.utils import is_classification
label_desc: Use image node_id 5 for calling the ModelProcessor obj's underlying member method code with example usage: obj.inbuiltColumnsTransformer(data) and returns: preprocessor