code: def test_ordinal_encoder_df(test_sample) -> None:
      X = test_sample
      enc = OrdinalEncoder()
      enc.fit(X)
      Xt = enc.transform(X)
  
      X_1 = DataFrame({"cat": ["F", "F"], "num": [1, 2]})
      Xt_1 = enc.transform(X_1)
  
      assert Xt_1.iloc[0, 0] == Xt.iloc[1, 0]
      assert Xt_1.iloc[1, 0] == Xt.iloc[1, 0]
      assert Xt_1.iloc[0, 1] == Xt.iloc[0, 1]
      assert Xt_1.iloc[1, 1] == Xt.iloc[2, 1]
  
      inv_Xt = enc.inverse_transform(Xt)
      inv_Xt_1 = enc.inverse_transform(Xt_1)
  
      assert inv_Xt.equals(X)
      assert inv_Xt_1.equals(X_1)
  
      assert enc.n_features_in_ == 2
  
file_path: cuml/python/cuml/tests/test_ordinal_encoder.py
imports: import cupy
  import numpy
  import pandas
  import pytest
  from sklearn.preprocessing import OrdinalEncoder
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.preprocessing import OrdinalEncoder
label_desc: Use image node_id 2 for calling a global function with example usage: test_ordinal_encoder_df(test_sample) without return types