title: Finding common rows (intersection) in two Pandas dataframes
body: <p>Assume I have two dataframes of this format (call them <code>df1</code> and <code>df2</code>):</p>
  
  <pre><code>+------------------------+------------------------+--------+
  |        user_id         |      business_id       | rating |
  +------------------------+------------------------+--------+
  | rLtl8ZkDX5vH5nAx9C3q5Q | eIxSLxzIlfExI6vgAbn2JA |      4 |
  | C6IOtaaYdLIT5fWd7ZYIuA | eIxSLxzIlfExI6vgAbn2JA |      5 |
  | mlBC3pN9GXlUUfQi1qBBZA | KoIRdcIfh3XWxiCeV1BDmA |      3 |
  +------------------------+------------------------+--------+
  </code></pre>
  
  <p>I'm looking to get a dataframe of all the rows that have a common <code>user_id</code> in <code>df1</code> and <code>df2</code>. (ie. if a <code>user_id</code> is in both <code>df1</code> and <code>df2</code>, include the two rows in the output dataframe)</p>
  
  <p>I can think of many ways to approach this, but they all strike me as clunky. For example, we could find all the unique <code>user_id</code>s in each dataframe, create a set of each, find their intersection, filter the two dataframes with the resulting set and concatenate the two filtered dataframes.</p>
  
  <p>Maybe that's the best approach, but I know Pandas is clever. Is there a simpler way to do this? I've looked at <code>merge</code> but I don't think that's what I need.</p>