-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Closed
Labels
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
df1=pd.DataFrame({'a':1,'b':2},index=[0])
df2=pd.DataFrame({'a':1,'b':2},index=[0])
df_new=pd.concat([df1,df2],axis=1)
Issue Description
When concatenation is done by axis=1 the duplicate columns are added up without raising an error then this will be very confusing as these are not identified as different
Expected Behavior
If the columns are the same before concatenating then in new df these should be some unique identifier
let's say: a(1), b(1) like this
Installed Versions
Replace this line with the output of pd.show_versions()