I am facing a problem while trying to combining two data frames into one.
Data frame structure :1
FROM TO WEIGHT
1 abc_1 Dummy 100
2 abc_2 Dummy 20
3 xyz_1 abc_3 40
Data frame structure :1
FROM TO WEIGHT
1 abc_4 Dummy_7 100
2 abc_7 Dummy_9 2000
3 xyz_1 abc_3 400
I want to combine two data frames with the same structure and add the weights when the FROM and TO fields are the same in both entries. Otherwise I just want to combine the entries in one with the entries in the other. I want a new dataframe that gives me the output
FROM TO WEIGHT
1 abc_1 Dummy 100
2 abc_2 Dummy 20
**3 xyz_1 abc_3 440**
4 abc_4 Dummy_7 100
5 abc_7 Dummy_9 2000
Thanks