docstr: Check fit private method
docstr_tok: ["Check","fit","private","method"]
code: def test_fit_na_fill(self):
      """
      Check fit private method
      """
      d = {
          "col1": [1, 2, 3, np.nan, np.nan],
          "col2": ["a", "a", np.nan, "b", "c"],
          "col3": ["a", "a", "d", "b", "c"],
      }
      df = pd.DataFrame(data=d)
      # fill with median
      preprocess_missing = PreprocessingMissingValues(
          df.columns, PreprocessingMissingValues.FILL_NA_MEDIAN
      )
      preprocess_missing._fit_na_fill(df)
      self.assertTrue("col1" in preprocess_missing._na_fill_params)
      self.assertTrue("col2" in preprocess_missing._na_fill_params)
      self.assertTrue("col3" not in preprocess_missing._na_fill_params)
      self.assertEqual(2, preprocess_missing._na_fill_params["col1"])
      self.assertEqual("a", preprocess_missing._na_fill_params["col2"])
      # fill with mean
      preprocess_missing = PreprocessingMissingValues(
          df.columns, PreprocessingMissingValues.FILL_NA_MEAN
      )
      preprocess_missing._fit_na_fill(df)
      self.assertTrue("col1" in preprocess_missing._na_fill_params)
      self.assertTrue("col2" in preprocess_missing._na_fill_params)
      self.assertTrue("col3" not in preprocess_missing._na_fill_params)
      self.assertEqual(2, preprocess_missing._na_fill_params["col1"])
      self.assertEqual("a", preprocess_missing._na_fill_params["col2"])
      # fill with min
      preprocess_missing = PreprocessingMissingValues(
          df.columns, PreprocessingMissingValues.FILL_NA_MIN
      )
      preprocess_missing._fit_na_fill(df)
      self.assertTrue("col1" in preprocess_missing._na_fill_params)
      self.assertTrue("col2" in preprocess_missing._na_fill_params)
      self.assertTrue("col3" not in preprocess_missing._na_fill_params)
      self.assertEqual(0, preprocess_missing._na_fill_params["col1"])
      self.assertEqual(
          "_missing_value_", preprocess_missing._na_fill_params["col2"]
      )
  
file_path: mljar-supervised/tests/tests_preprocessing/test_preprocessing_missing.py
imports: import unittest
  import tempfile
  import numpy
  import pandas
  from supervised.preprocessing.preprocessing_utils import PreprocessingUtils
  from supervised.preprocessing.preprocessing_missing import PreprocessingMissingValues
label_desc: Use image node_id 3 for calling the PreprocessingMissingValuesTest obj's underlying member method code with example usage: obj.test_fit_na_fill() without return types