We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84efff6 commit 7626b8bCopy full SHA for 7626b8b
pandas/core/frame.py
@@ -6484,8 +6484,6 @@ def combiner(x, y):
6484
6485
if self.columns.equals(other.columns):
6486
6487
- if self.empty and len(other) == other_idxlen:
6488
- return other.copy()
6489
if self.index.equals(other.index):
6490
return self.copy()
6491
elif self.empty:
@@ -6504,7 +6502,11 @@ def combiner(x, y):
6504
6502
other_vals = other[col][diff_index]
6505
6503
new_dtype = find_common_type([this_vals.dtype, other_vals.dtype])
6506
6507
- series = Series([this_vals.values[0]] * len(new_index), dtype=new_dtype, index=new_index)
+ series = Series(
+ [this_vals.values[0]] * len(new_index),
+ dtype=new_dtype,
6508
+ index=new_index
6509
+ )
6510
6511
series[self_index] = this_vals
6512
series[diff_index] = other_vals
0 commit comments