docstr: Unit test for apply preprocessing on OrdinalEncoder
docstr_tok: ["Unit","test","for","apply","preprocessing","on","OrdinalEncoder"]
code: def test_transform_ce_2(self):
      """
      Unit test for apply preprocessing on OrdinalEncoder
      """
      y = pd.DataFrame(data=[0, 1], columns=["y"])
  
      train = pd.DataFrame(
          {"num1": [0, 1], "num2": [0, 2], "other": [1, 0]}
      )
  
      enc = ce.ordinal.OrdinalEncoder(cols=["num1", "num2"])
      enc.fit(train, y)
  
      train_preprocessed = pd.DataFrame(enc.transform(train))
      clf = cb.CatBoostClassifier(n_estimators=1).fit(
          train_preprocessed, y
      )
      test = pd.DataFrame(
          {"num1": [0, 1, 1], "num2": [0, 2, 0], "other": [1, 0, 0]}
      )
  
      expected = pd.DataFrame(enc.transform(test), index=test.index)
      result = apply_preprocessing(test, clf, enc)
      assert result.shape == expected.shape
      assert [column in clf.feature_names_ for column in result.columns]
      assert all(expected.index == result.index)
  
imports: import unittest
  import pandas
  import numpy
  import category_encoders
  import catboost
  import lightgbm
  import xgboost
  from shapash.utils.transform import inverse_transform, apply_preprocessing, get_col_mapping_ce
  from sklearn.ensemble import GradientBoostingClassifier
label_desc: Use image node_id 28 for calling the TestInverseTransformCaterogyEncoder obj's underlying member method code with example usage: obj.test_transform_ce_2() without return types