Open
Description
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
a = pd.DataFrame({0:[1,2,3]})
b = pd.DataFrame(index=[1,2,3],data={0:[4,5,6]})
a.join(b, on=0, rsuffix='_test')
Issue Description
When dataframe a and b have the same column name, a key_ column is created unexpectedly after the join operation.
key_0 0 0_test
0 1 1 4
1 2 2 5
2 3 3 6
Expected Behavior
Expecting result without the key_0 column.
Installed Versions
pandas : 2.2.3
numpy : 1.26.4