pandas: merge/concat.join two dfs
<p>I have 2 dfs which I want to merge/concat/join. </p>

<p>Here is df1:</p>

<pre><code> item    country  Month Year
 honda   JP       2     16
 sony    GB       6     16
 jazz    JP       6     16
 honda   US       6     16
 jazz    JP       1     16
</code></pre>

<p>Here is df2:</p>

<pre><code> item    country  pay 
 honda   JP       y   
 sony    GB       n   
 jazz    JP       y   
 honda   US       y   
 jazz    JP       n   
</code></pre>

<p>Here is what I want the merge to look like:</p>

<pre><code> item    country  pay  Month Year
 honda   JP       y     2     16
 sony    GB       n     6     16
 jazz    JP       y     6     16
 honda   US       y     6     16
 jazz    JP       n     1     16
</code></pre>

<p>I used <code>df = df1.join(df2, how='outer')</code> but it created duplicates. </p>

<p>I would like to use the <code>item</code> and <code>country</code> columns to merge in the <code>pay</code> column, if that make sense?</p>