title: How to get rows having same column data in 2 different dataFrames in pandas?
body: <p>I have 2 different DataFrames:</p>
  <pre><code>df1
  </code></pre>
  <pre><code>    col1 col2 col3
   0   d1    p1  k1
   1   d2    p2  k2
   2   s1    s2  k3
   3   s3    s4  k4
  </code></pre>
  <pre><code>df2
  </code></pre>
  <pre><code>     col3 col4 col3
   0   d1    p1  m1
   1   d2    p2  m2
   2   f1    f2  m3
   3   f3    f4  m4
   4   f5    g2  m5
  </code></pre>
  <p>The result that I want is - rows having the same 1st 2 column values. In the example above, that is the rows <code>d1, p1</code> and <code>d2, p2</code>:</p>
  <pre><code>      col col
   0   d1    p1
   1   d2    p2
  </code></pre>
  <p>How can this be achieved? I tried using <code>concat</code>, <code>merge</code>, and <code>drop</code> but nothing worked.</p>