First of all, thanks in advance.
I am trying to join two large pandas dataframes:
1.The two frames have the same number of rows. 2.There are some common columns (that also have the same column dataframe name) 3.The order of the common columns is not always the same (i.e column 'Hours' is the second one in the first dataframe but the first one in the second one)
What I want is to join both dataframes in such a way that:
- Common columns are merged
- I keep all the columns that are different in each dataframe.
I have seen some answers here related to the use of the pd.merge() function but in all of them the key of the column has to be supplied. I want to avoid that,since the number of columns is quite big. I imagine there must be a way to avoid writing, for instance 50 column keys.
Hope I explained myself properly,
Thanks a lot and have a great day!! :)