I have a dataframe with the following structure:
0 1 2
0 0.00086076 500.00000000 []
1 0.00086075 819.00000000 []
2 0.00086072 1162.00000000 []
3 0.00086071 20.00000000 []
4 0.00086069 10170.00000000 []
5 0.00086067 18.00000000 []
Then I have another dataframe with update values:
0 1 2
0 0.00086071 50.00000000 []
1 0.00086068 81.00000000 []
It is sorted on column 0 and I need to merge the two as follows:
0 1 2
0 0.00086076 500.00000000 []
1 0.00086075 819.00000000 []
2 0.00086072 1162.00000000 []
3 0.00086071 50.00000000 []
4 0.00086069 10170.00000000 []
5 0.00086068 81.00000000 []
6 0.00086067 18.00000000 []
So if a value matches one in column 0 it should update column 1 if not it should insert a new row and sort again.
Is there an efficient way or predefined function for doing this?