Skip to content

Commit 33c889c

Browse files
committed
switch np.where condition to check if non nan
1 parent 311106a commit 33c889c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/reshape/tile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def _coerce_to_type(x):
444444
if dtype is not None:
445445
# GH 19768: force NaT to NaN during integer conversion
446446
if is_bool_dtype(x):
447-
x = np.where(x.notna(), x.astype(int), np.nan)
447+
x = np.where(~np.isnan(x), x.astype(int), np.nan)
448448
else:
449449
x = np.where(x.notna(), x.view(np.int64), np.nan)
450450

0 commit comments

Comments
 (0)