title: Pandas : Dataframe Merge Error with two columns match
body: <p>I have 2 dataframes that look very closely to the one below (there are extra columns that however shouldn't affect the result):</p>
  
  <p><strong>Edit</strong>: Added extra variable as requested.  The - sign means missing data</p>
  
  <p><strong>dataframe1</strong></p>
  
  <pre><code>ProductID      Date           Booked Rate
  
  10             01/01/2017     10.0
  10             02/01/2017     0.3
  10             03/01/2017      70.4
  20             01/01/2017     100.0
  20             02/01/2017      70.0
  20             03/01/2017     0.1
  -              04/01/2017      0.5
  </code></pre>
  
  <p><strong>dataframe2</strong></p>
  
  <pre><code>ProductID      Date           Actual Rate
  
  10             01/01/2017     11.0
  10             02/01/2017     12.3
  10             03/01/2017      75.4
  20             01/01/2017     110.0
  20             02/01/2017     80.0
  30             03/01/2017     10.1
  -              04/01/2017     0.7
  </code></pre>
  
  <p>Ideally the result should be <strong>dataframe 3:</strong></p>
  
  <pre><code> ProductID      Date          Booked Rate   Actual Rate
  
   10            01/01/2017     10.0         11.0
   10            02/01/2017     0.3          12.3
   10            03/01/2017      70.4         75.4
   20            01/01/2017     100.0        110.0
   20            02/01/2017     70.0         80.0
   20            03/01/2017     0.1          -
   -             04/01/2017     0.5          -
  </code></pre>
  
  <p>When I do the merge on my real dataset, using the following code :</p>
  
  <pre><code>df3 = pd.merge(left=df1, right=df2, how="left", left_on=["ProductID", "Date"], right_on=["ProductID", "Date"])
  </code></pre>
  
  <p>I get the wrong result as numbers from the extra columns (ommited for clarity) are sometimes doubled/tripled.</p>
  
  <p><strong>Edit:</strong> <strong>This seems to be because it matches the empty ProductID fields from dataframe1 with the empty productIDs from dataframe2. I would need to ommit this.</strong></p>
  
  <p>What I really need, is a simple merge where the actual rate from dataframe2 is added as a new column when it finds a match for productId and Date in dataframe1. Any extra item from dataframe2 should be excluded, and no matches in dataframe1 should be excluded.</p>
  
  <p>I also tried, right, inner, outer, merges.</p>
  
  <p>It seems to always warp the result in the same exact way (doubling and tripling certain line items).</p>