Skip to content

Commit ae99b3d

Browse files
fix typo, fewer comments
1 parent f786763 commit ae99b3d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/core/frame.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9163,9 +9163,7 @@ def combiner(x: Series, y: Series):
91639163
)
91649164
combined = combined.astype(other.dtypes)
91659165
else:
9166-
# GH #60128
9167-
# Promote large 64-bit integers to their nullable types.
9168-
# Without this, precision will be lost in a float64 rount-trip.
9166+
# GH#60128 Avoid lossy conversion to float64
91699167
def _cast_large_numpy_ints_to_nullable(df: DataFrame) -> DataFrame:
91709168
BOUND = 2**53
91719169
cast_map: dict[str, str] = {}
@@ -9184,7 +9182,7 @@ def _cast_large_numpy_ints_to_nullable(df: DataFrame) -> DataFrame:
91849182
cast_map[col] = "Int64"
91859183
return df.astype(cast_map) if cast_map else df
91869184

9187-
# Only cast frames whose index expand to the union (i.e., get <NA> on align)
9185+
# Cast any side that will gain rows on outer align (introduces <NA>).
91889186
if len(other.index.difference(self.index, sort=False)):
91899187
self = _cast_large_numpy_ints_to_nullable(self)
91909188
if len(self.index.difference(other.index, sort=False)):

0 commit comments

Comments
 (0)