From 8f172fb2d6b98f84a9fc8ea5a3a031726a30eb79 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 6 Sep 2022 20:04:12 +0200 Subject: [PATCH] REF: ensure to apply suffixes before concat step in merge code --- pandas/core/reshape/merge.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index 5052c27ea47f3..472984c65a897 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -764,8 +764,9 @@ def _reindex_and_concat( from pandas import concat + left.columns = llabels + right.columns = rlabels result = concat([left, right], axis=1, copy=copy) - result.columns = llabels.append(rlabels) return result def get_result(self, copy: bool = True) -> DataFrame: