Skip to content

Commit 3e81813

Browse files
committed
Use lib.is_float
1 parent b29fc23 commit 3e81813

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/util/_validators.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
is_bool,
2424
is_integer,
2525
)
26-
from pandas.core.dtypes.missing import isna
2726

2827
BoolishT = TypeVar("BoolishT", bool, int)
2928
BoolishNoneT = TypeVar("BoolishNoneT", bool, int, None)
@@ -292,7 +291,7 @@ def validate_na_arg(value, name: str):
292291
or isinstance(value, bool)
293292
or value is None
294293
or value is NA
295-
or (isna(value) and np.isnan(value))
294+
or (lib.is_float(value) and np.isnan(value))
296295
):
297296
return
298297
raise ValueError(f"{name} must be None, pd.NA, np.nan, True, or False; got {value}")

0 commit comments

Comments
 (0)