I may be getting close, this is the wrong way. If I have two data frames a and b:
Dataframe A:
a b c
1 2 4
1 6 5
1 8 7
and Dataframe B:
a b c d
1 2 4 9
1 6 5 7
1 8 7 10
And I want to join them, but it's cool to sum the columns where the column name matches, and keep the column names that don't match. So, the final merged table will look like this:
a b c d
2 4 8 9
2 12 10 7
2 16 14 10
Note. Indexes will always match (e.g., as many records in the same order)
source
share