File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -1755,7 +1755,7 @@ def _cython_agg_general(
17551755 ** kwargs ,
17561756 ):
17571757 # Note: we never get here with how="ohlc" for DataFrameGroupBy;
1758- # that goes through SeriesGroupBy
1758+ # that goes through SeriesGroupBy
17591759
17601760 if not is_bool (numeric_only ):
17611761 raise ValueError ("numeric_only accepts only Boolean values" )
Original file line number Diff line number Diff line change @@ -1522,13 +1522,10 @@ def test_groupby_std_datetimelike():
15221522 tm .assert_frame_equal (result , expected )
15231523
15241524def test_mean_numeric_only_validates_bool ():
1525- """
1526- Test that numeric_only parameter only accepts boolean values.
1527- See GH#62778
1528- """
1525+ # GH#62778
1526+
15291527 df = pd .DataFrame ({"A" : range (5 ), "B" : range (5 )})
15301528
1531- # These test cases should raise a ValueError
15321529 msg = "numeric_only accepts only Boolean values"
15331530 with pytest .raises (ValueError , match = msg ):
15341531 df .groupby (["A" ]).mean (["B" ])
@@ -1538,9 +1535,3 @@ def test_mean_numeric_only_validates_bool():
15381535
15391536 with pytest .raises (ValueError , match = msg ):
15401537 df .groupby (["A" ]).mean (numeric_only = 1 )
1541-
1542- # These test cases should work absolutely fine
1543- df .groupby (["A" ]).mean ()
1544- df .groupby (["A" ]).mean (numeric_only = True )
1545- df .groupby (["A" ]).mean (numeric_only = False )
1546-
You can’t perform that action at this time.
0 commit comments