We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8ba339 commit f786763Copy full SHA for f786763
pandas/core/frame.py
@@ -9185,10 +9185,9 @@ def _cast_large_numpy_ints_to_nullable(df: DataFrame) -> DataFrame:
9185
return df.astype(cast_map) if cast_map else df
9186
9187
# Only cast frames whose index expand to the union (i.e., get <NA> on align)
9188
- union_index = self.index.union(other.index)
9189
- if not self.index.equals(union_index):
+ if len(other.index.difference(self.index, sort=False)):
9190
self = _cast_large_numpy_ints_to_nullable(self)
9191
- if not other.index.equals(union_index):
+ if len(self.index.difference(other.index, sort=False)):
9192
other = _cast_large_numpy_ints_to_nullable(other)
9193
9194
combined = self.combine(other, combiner, overwrite=False)
0 commit comments