Skip to content

Commit 257de7b

Browse files
author
Rajat Jain
committed
_may_promote hotfix.
1 parent 34177d6 commit 257de7b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def ensure_dtype_can_hold_na(dtype: DtypeObj) -> DtypeObj:
535535
elif dtype.kind == "b":
536536
return _dtype_obj
537537
elif dtype.kind in "iu":
538-
return np.dtype(np.float64)
538+
return np.dtype(np.int64)
539539
return dtype
540540

541541

@@ -625,7 +625,6 @@ def _maybe_promote(dtype: np.dtype, fill_value=np.nan):
625625
return dtype, fill_value
626626

627627
if is_valid_na_for_dtype(fill_value, dtype) and dtype.kind in "iufcmM":
628-
dtype = ensure_dtype_can_hold_na(dtype)
629628
fv = na_value_for_dtype(dtype)
630629
return dtype, fv
631630

0 commit comments

Comments
 (0)