code: def test_defaults_pandas():
      new_data = iris_amp.loc[range(10), :].copy()
  
      kernel = mf.ImputationKernel(
          data=iris_amp, datasets=2, save_models=1
      )
      kernel.mice(iterations=2, compile_candidates=True, verbose=True)
  
      kernel2 = mf.ImputationKernel(
          data=iris_amp, datasets=1, save_models=1
      )
      kernel2.mice(iterations=2)
  
      # Test appending and then test kernel.
      kernel.append(kernel2)
      kernel.compile_candidate_preds()
  
      # Test mice after appendage
      kernel.mice(1, verbose=True)
  
      kernel.complete_data(0, inplace=True)
      assert all(kernel.working_data.isnull().sum() == 0)
      assert (
          kernel.get_model(0, 0, 3).params["objective"] == "regression"
      )
      assert (
          kernel.get_model(0, "bc", 3).params["objective"] == "binary"
      )
      assert (
          kernel.get_model(0, "sp", 3).params["objective"]
          == "multiclass"
      )
  
      # Make sure we didn't touch the original data
      assert all(iris_amp.isnull().sum() > 0)
  
      imp_ds = kernel.impute_new_data(new_data, verbose=True)
      imp_ds.complete_data(2, inplace=True)
      assert all(imp_ds.working_data.isnull().sum(0) == 0)
      assert new_data.isnull().sum().sum() > 0
  
      # Make sure fully-recognized data can be passed through with no changes
      imp_fr = kernel.impute_new_data(iris)
      comp_fr = imp_fr.complete_data(0)
      assert np.all(
          comp_fr == iris
      ), "values of fully-recognized data were modified"
      assert imp_fr.iteration_count() == -1
  
      # Make sure single rows can be imputed
      single_row = new_data.iloc[[0], :]
      imp_sr = kernel.impute_new_data(single_row)
      assert np.all(imp_sr.complete_data(0).dtypes == single_row.dtypes)
  
file_path: miceforest/tests/test_ImputationKernel.py
imports: from sklearn.datasets import load_iris
  import pandas
  import numpy
  import miceforest
  from datetime import datetime
  from miceforest import mean_match_fast_cat, mean_match_shap
  from matplotlib.pyplot import close
  from tempfile import mkstemp
label_desc: Use image node_id 1 for calling a global function with example usage: test_defaults_pandas() without return types