I have two dataframes which share many columns, but not all. Generally, I wouold like to merge these two dataframes. This has a slight twist though... Both dataframes have an ID-column. Some IDs are in both dataframes. In dataframe A the status of a certain ID might be 'pending', whereas in dataframe B it might be 'closed'. Generally, B is the more up-to-date dataframe, so I would like merge both dataframes, but keep the status only of the dataframe B.
The dataframes might look like this.
Dataframe A
ID   status     date         someColumnA
1    'open'     01.01.2020   A
2    'closed'   01.01.2020   B
3    'pending'  01.01.2020   C
Dataframe B
ID   status     date         someColumnB
1    'closed'   01.01.2020   rr
2    'closed'   01.01.2020   tt
4    'pending'  01.01.2020   zz
In the end I would like to receive a dataframe like such
ID   status     date         someColumnA someColumnB
1    'closed'   01.01.2020   A           rr
2    'closed'   01.01.2020   B           tt
3    'pending'  01.01.2020   C           -
4    'pending'  01.01.2020   -           zz
Thanks for the help!
 
     
    