Skip to content

Commit 7e6837f

Browse files
thinner comment
1 parent 1a53d48 commit 7e6837f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

pandas/core/frame.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9062,13 +9062,14 @@ def _restore_wide_ints(
90629062
]
90639063
if dtypes_to_resolve:
90649064
if isna(ser).any():
9065-
# Currently, align upcasts to float64 when NAs are present.
9066-
# Do this so we don't have to modify any tests that expect
9067-
# float dtype when NAs are present. BUT we could consider
9068-
# embracing nullable integer dtype since large integers are
9069-
# still losing information on conversion to float -- it's
9070-
# just not obvious because they aren't cast back to int
9071-
# when NAs are present.
9065+
# Currently, align upcasts to float64 when NAs are
9066+
# present. Do this so we don't have to modify any
9067+
# tests that expect float dtype when NAs are
9068+
# present. BUT we could consider embracing nullable
9069+
# integer dtypes since large integers are still
9070+
# losing information on conversion to float -- it's
9071+
# just not obvious because they aren't cast back to
9072+
# int when NAs are present.
90729073
dtypes_to_resolve.append(np.dtype("float64"))
90739074
target_type = find_common_type(dtypes_to_resolve)
90749075
cast_map[col] = target_type

0 commit comments

Comments
 (0)