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 44c9a14 commit e2f4afdCopy full SHA for e2f4afd
pandas/core/frame.py
@@ -8806,7 +8806,10 @@ def combiner(x: Series, y: Series):
8806
)
8807
combined = combined.astype(other.dtypes)
8808
else:
8809
+ # preserve column order
8810
+ new_columns = self.columns.union(other.columns, sort=False)
8811
combined = self.combine(other, combiner, overwrite=False)
8812
+ combined = combined.reindex(columns=new_columns)
8813
8814
dtypes = {
8815
col: find_common_type([self.dtypes[col], other.dtypes[col]])
0 commit comments