Skip to content

Commit cc61621

Browse files
committed
Update
1 parent 58230c9 commit cc61621

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/frame.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8671,9 +8671,7 @@ def combine(
86718671
2 NaN 3.0 1.0
86728672
"""
86738673
other_idxlen = len(other.index) # save for compare
8674-
8675-
# preserve column order
8676-
new_columns = self.columns.union(other.columns, sort=False)
8674+
other_columns = other.columns
86778675

86788676
this, other = self.align(other)
86798677
new_index = this.index
@@ -8684,6 +8682,8 @@ def combine(
86848682
if self.empty and len(other) == other_idxlen:
86858683
return other.copy()
86868684

8685+
# preserve column order
8686+
new_columns = self.columns.union(other_columns, sort=False)
86878687
do_fill = fill_value is not None
86888688
result = {}
86898689
for col in new_columns:

0 commit comments

Comments
 (0)