Python: how to merge two dataframes with different size? : <p>I have two dataframes, <code>df</code> and <code>df1</code>. 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.</p>

<pre><code>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      
</code></pre>

<p>I would like to merge <code>df</code> and <code>df1</code> in order to have the following:</p>

<pre><code>df1

x   y   distance    
1   3      5
2   3      1
2   3      1
</code></pre>
