I have two Pandas dataframes (Master & Input) with the same Index but a different number of columns, e.g.
Dataframe 1 (Master):
ID | A | B | C
101 | .. | .. | ..
102 | .. | .. | ..
103 | .. | .. | ..
Dataframe 2 (Input):
ID | A | B | C | E | F
101 | .. | .. | .. | .. | ..
102 | .. | XY | YZ | .. | ..
223 | .. | .. | .. | .. | ..
351 | .. | .. | .. | .. | ..
I want to merge the Input DF into the Master DF if new rows have been added (see ID 223, 351) OR an item in the Input DF has been updated (see ID 102).
Additional columns in the Input DF can be ignored.
Goal:
ID | A | B | C
101 | .. | .. | ..
102 | .. | XY | YZ
103 | .. | .. | ..
223 | .. | .. | ..
351 | .. | .. | ..