I have two dataframes, df
and df1
. The first one contains all the information about all the possible combination of a dataset while the second one is just a subset without the information.
df
x y distance
0 1 4
0 2 3
0 3 2
1 2 2
1 3 5
2 3 1
df1
x y
1 3
2 3
2 3
I would like to merge df
and df1
in order to have the following:
df1
x y distance
1 3 5
2 3 1
2 3 1