class_docstr: Tests for percentile encoder.
docstr: The global median of the target is 3. If new categories are passed to
  the transformer, then the output should be 3
docstr_tok: ["The","global","median","of","the","target","is","3",".","If","new","categories","are","passed","to","the","transformer",",","then","the","output","should","be","3"]
code: def test_new_category(self):
      """
      The global median of the target is 3. If new categories are passed to
      the transformer, then the output should be 3
      """
      transformer_median = encoders.QuantileEncoder(quantile=0.5, m=0.0)
      transformer_median.fit(self.df, self.target)
  
      new_df = pd.DataFrame({"categories": ["d", "e"]})
  
      new_medians = pd.DataFrame({"categories": [3.0, 3.0]})
  
      pd.testing.assert_frame_equal(
          transformer_median.transform(new_df), new_medians
      )
  
file_path: category_encoders/tests/test_quantile_encoder.py
imports: import unittest
  import pandas
  import category_encoders
  import numpy
label_desc: Use image node_id 4 for calling the TestQuantileEncoder obj's underlying member method code with example usage: obj.test_new_category() without return types