class_docstr: Tests for percentile encoder.
docstr: Expected output of percentile 50 in df:
      - a median is 4 (a values are 1, 4, 6)
      - b median is 5 (b values are 2, 5, 7)
      - c median is 0 (c values are 0)
docstr_tok: ["Expected","output","of","percentile","50","in","df",":","-","a","median","is","4","(","a","values","are","1",",","4",",","6",")","-","b","median","is","5","(","b","values","are","2",",","5",",","7",")","-","c","median","is","0","(","c","values","are","0",")"]
code: def test_median_works(self):
      """
      Expected output of percentile 50 in df:
          - a median is 4 (a values are 1, 4, 6)
          - b median is 5 (b values are 2, 5, 7)
          - c median is 0 (c values are 0)
      """
  
      expected_output_median = pd.DataFrame(
          {"categories": [4.0, 5, 0, 4, 5, 0, 4, 5]}
      )
  
      pd.testing.assert_frame_equal(
          encoders.QuantileEncoder(quantile=0.5, m=0.0).fit_transform(
              self.df, self.target
          ),
          expected_output_median,
      )
  
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 2 for calling the TestQuantileEncoder obj's underlying member method code with example usage: obj.test_median_works() without return types