Skip to content

Commit 5eedd75

Browse files
Backport PR #48416 on branch 1.5.x (REF: ensure to apply suffixes before concat step in merge code) (#48470)
Backport PR #48416: REF: ensure to apply suffixes before concat step in merge code Co-authored-by: Joris Van den Bossche <[email protected]>
1 parent ba3494c commit 5eedd75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/reshape/merge.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,9 @@ def _reindex_and_concat(
764764

765765
from pandas import concat
766766

767+
left.columns = llabels
768+
right.columns = rlabels
767769
result = concat([left, right], axis=1, copy=copy)
768-
result.columns = llabels.append(rlabels)
769770
return result
770771

771772
def get_result(self, copy: bool = True) -> DataFrame:

0 commit comments

Comments
 (0)