I have two dataframes with the same date and client id, but with a different amount.
I try to get another dataframe with dfA amount value and keep the another 0's on dfB when dfA does not exist
dfA:
client_id date amount
0 1 2020-07-11 100
1 1 2020-07-10 90
2 1 2020-07-09 80
3 1 2020-07-12 70
3 1 2020-07-01 86
dfB:
client_id date amount
0 1 2020-07-11 0
1 1 2020-07-10 0
2 1 2020-07-09 0
3 1 2020-07-07 0
4 1 2020-07-06 0
5 1 2020-07-05 0
5 1 2020-07-04 0
3 1 2020-07-03 0
4 1 2020-07-02 0
5 1 2020-07-01 0
I want to get:
dfResult:
client_id date amount
0 1 2020-07-11 100
1 1 2020-07-10 90
2 1 2020-07-09 80
3 1 2020-07-07 70
4 1 2020-07-06 0
5 1 2020-07-05 0
5 1 2020-07-04 0
3 1 2020-07-03 0
4 1 2020-07-02 0
5 1 2020-07-01 86