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 58230c9 commit cc61621Copy full SHA for cc61621
pandas/core/frame.py
@@ -8671,9 +8671,7 @@ def combine(
8671
2 NaN 3.0 1.0
8672
"""
8673
other_idxlen = len(other.index) # save for compare
8674
-
8675
- # preserve column order
8676
- new_columns = self.columns.union(other.columns, sort=False)
+ other_columns = other.columns
8677
8678
this, other = self.align(other)
8679
new_index = this.index
@@ -8684,6 +8682,8 @@ def combine(
8684
8682
if self.empty and len(other) == other_idxlen:
8685
8683
return other.copy()
8686
+ # preserve column order
+ new_columns = self.columns.union(other_columns, sort=False)
8687
do_fill = fill_value is not None
8688
result = {}
8689
for col in new_columns:
0 commit comments