@@ -248,9 +248,11 @@ def test_groupby_quantile_skips_invalid_dtype(q):
248
248
tm .assert_frame_equal (result , expected )
249
249
250
250
251
- def test_groupby_quantile_NA_float (any_float_dtype ):
251
+ def test_groupby_quantile_NA_float (any_float_allowed_nullable_dtype ):
252
252
# GH#42849
253
- df = DataFrame ({"x" : [1 , 1 ], "y" : [0.2 , np .nan ]}, dtype = any_float_dtype )
253
+ df = DataFrame (
254
+ {"x" : [1 , 1 ], "y" : [0.2 , np .nan ]}, dtype = any_float_allowed_nullable_dtype
255
+ )
254
256
result = df .groupby ("x" )["y" ].quantile (0.5 )
255
257
expected = pd .Series ([0.2 ], dtype = float , index = [1.0 ], name = "y" )
256
258
expected .index .name = "x"
@@ -265,9 +267,9 @@ def test_groupby_quantile_NA_float(any_float_dtype):
265
267
tm .assert_series_equal (result , expected )
266
268
267
269
268
- def test_groupby_quantile_NA_int (any_int_ea_dtype ):
270
+ def test_groupby_quantile_NA_int (any_nullable_int_dtype ):
269
271
# GH#42849
270
- df = DataFrame ({"x" : [1 , 1 ], "y" : [2 , 5 ]}, dtype = any_int_ea_dtype )
272
+ df = DataFrame ({"x" : [1 , 1 ], "y" : [2 , 5 ]}, dtype = any_nullable_int_dtype )
271
273
result = df .groupby ("x" )["y" ].quantile (0.5 )
272
274
expected = pd .Series ([3.5 ], dtype = float , index = Index ([1 ], name = "x" ), name = "y" )
273
275
tm .assert_series_equal (expected , result )
0 commit comments