I have two Pandas DataFrames below:
DataFrame1
id a comment
0 1 1 yes
1 2 2 no
2 3 3 yes
DataFrame2
id a
0 2 5
1 4 4
I'd like to update DataFrame1 with the contents of DataFrame2 based on the id column. Any new rows found in DataFrame2 not in DataFrame1 should be appended.
The result should look like this:
DataFrame3
id a comment
0 1 1 yes
1 2 5 no
2 3 3 yes
3 4 4
I've tried using a mixture of DataFrame update/append/concat functions but can't quite get what I'm looking for. Any suggestions?