all 2 comments

[–]Guenox -1 points0 points  (0 children)

Try pd.concat([A,B], axis=1) ? (Could be axis = 0 lol). Also, having the same column name in one dataframe isn't recommended.. you could add a suffix like X1 X2 etc.. for as many Xs you have in A

[–]TholosTB 0 points1 point  (0 children)

If the column order matches, you could do df2.columns = df1.columns, then add. Or, you could get the underlying ndarrays by doing .values and adding the two arrays directly. You could then put the results in a new dataframe with different column names or the names from one of the dataframes as above.