code: def test_non_categorical_columns_are_ignored():
      ds = load_dataset(incl_test=True)
      categoricals = {
          n for n, t in ds.train.types.items() if t == "enum"
      } - {ds.target}
      non_cat = next(
          n for n, t in ds.train.types.items() if t in ["int", "real"]
      )
      to_encode = categoricals | {non_cat}
      assert len(to_encode) > len(categoricals) > 0
      te = H2OTargetEncoderEstimator()
      te.train(x=to_encode, y=ds.target, training_frame=ds.train)
      encoded = te.predict(ds.test)
      assert {"{}_te".format(n) for n in categoricals} < set(
          encoded.names
      ), "some provided categoricals haven't been encoded"
      assert (
          "{}_te".format(non_cat) not in encoded.names
      ), "non categorical column has been encoded (magic!)"
  
file_path: h2o-3/h2o-py/tests/testdir_algos/targetencoder/pyunit_targetencoder_training.py
imports: import os
  import sys
  import h2o
  from h2o.estimators import H2OTargetEncoderEstimator
  from h2o.exceptions import H2OResponseError
  from tests import pyunit_utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_non_categorical_columns_are_ignored() without return types