@@ -11430,6 +11430,7 @@ def corr(
11430
11430
dogs 1.0 NaN
11431
11431
cats NaN 1.0
11432
11432
""" # noqa: E501
11433
+ validate_bool_kwarg (numeric_only , "numeric_only" )
11433
11434
data = self ._get_numeric_data () if numeric_only else self
11434
11435
cols = data .columns
11435
11436
idx = cols .copy ()
@@ -11586,6 +11587,7 @@ def cov(
11586
11587
b NaN 1.248003 0.191417
11587
11588
c -0.150812 0.191417 0.895202
11588
11589
"""
11590
+ validate_bool_kwarg (numeric_only , "numeric_only" )
11589
11591
data = self ._get_numeric_data () if numeric_only else self
11590
11592
if any (blk .dtype .kind in "mM" for blk in self ._mgr .blocks ):
11591
11593
msg = (
@@ -11690,6 +11692,7 @@ def corrwith(
11690
11692
e NaN
11691
11693
dtype: float64
11692
11694
"""
11695
+ validate_bool_kwarg (numeric_only , "numeric_only" )
11693
11696
axis = self ._get_axis_number (axis )
11694
11697
this = self ._get_numeric_data () if numeric_only else self
11695
11698
@@ -11825,6 +11828,7 @@ def count(self, axis: Axis = 0, numeric_only: bool = False) -> Series:
11825
11828
4 3
11826
11829
dtype: int64
11827
11830
"""
11831
+ validate_bool_kwarg (numeric_only , "numeric_only" )
11828
11832
axis = self ._get_axis_number (axis )
11829
11833
11830
11834
if numeric_only :
@@ -13073,6 +13077,7 @@ def cummin(
13073
13077
* args ,
13074
13078
** kwargs ,
13075
13079
) -> Self :
13080
+ validate_bool_kwarg (numeric_only , "numeric_only" )
13076
13081
data = self ._get_numeric_data () if numeric_only else self
13077
13082
return NDFrame .cummin (data , axis , skipna , * args , ** kwargs )
13078
13083
@@ -13085,6 +13090,7 @@ def cummax(
13085
13090
* args ,
13086
13091
** kwargs ,
13087
13092
) -> Self :
13093
+ validate_bool_kwarg (numeric_only , "numeric_only" )
13088
13094
data = self ._get_numeric_data () if numeric_only else self
13089
13095
return NDFrame .cummax (data , axis , skipna , * args , ** kwargs )
13090
13096
@@ -13097,6 +13103,7 @@ def cumsum(
13097
13103
* args ,
13098
13104
** kwargs ,
13099
13105
) -> Self :
13106
+ validate_bool_kwarg (numeric_only , "numeric_only" )
13100
13107
data = self ._get_numeric_data () if numeric_only else self
13101
13108
return NDFrame .cumsum (data , axis , skipna , * args , ** kwargs )
13102
13109
@@ -13109,6 +13116,7 @@ def cumprod(
13109
13116
* args ,
13110
13117
** kwargs ,
13111
13118
) -> Self :
13119
+ validate_bool_kwarg (numeric_only , "numeric_only" )
13112
13120
data = self ._get_numeric_data () if numeric_only else self
13113
13121
return NDFrame .cumprod (data , axis , skipna , * args , ** kwargs )
13114
13122
@@ -13227,6 +13235,7 @@ def idxmin(
13227
13235
Beef consumption
13228
13236
dtype: object
13229
13237
"""
13238
+ validate_bool_kwarg (numeric_only , "numeric_only" )
13230
13239
axis = self ._get_axis_number (axis )
13231
13240
13232
13241
if self .empty and len (self .axes [axis ]):
@@ -13332,6 +13341,7 @@ def idxmax(
13332
13341
Beef co2_emissions
13333
13342
dtype: object
13334
13343
"""
13344
+ validate_bool_kwarg (numeric_only , "numeric_only" )
13335
13345
axis = self ._get_axis_number (axis )
13336
13346
13337
13347
if self .empty and len (self .axes [axis ]):
@@ -13458,6 +13468,7 @@ def mode(
13458
13468
spider 0.0 8.0
13459
13469
ostrich 2.0 NaN
13460
13470
"""
13471
+ validate_bool_kwarg (numeric_only , "numeric_only" )
13461
13472
data = self if not numeric_only else self ._get_numeric_data ()
13462
13473
13463
13474
def f (s ):
@@ -13596,6 +13607,7 @@ def quantile(
13596
13607
"""
13597
13608
validate_percentile (q )
13598
13609
axis = self ._get_axis_number (axis )
13610
+ validate_bool_kwarg (numeric_only , "numeric_only" )
13599
13611
13600
13612
if not is_list_like (q ):
13601
13613
# BlockManager.quantile expects listlike, so we wrap and unwrap here
0 commit comments