title: Select rows from a list of tuples in pandas
body: <p>I have a <code>DataFrame</code> like this:</p>
  
  <pre><code>In [140]: df.head()
  Out[140]: 
     user  brand  action  nthday
  0   767   3961       0      51
  1   767   3961       2      51
  2   767   3961       2      51
  3   767   3961       0      51
  4   767   3961       0      51
  </code></pre>
  
  <p>I want to select rows with a list of tuple like this:</p>
  
  <pre><code>mylist = [(767, 3961), (768, 4201),...]
  </code></pre>
  
  <p>I can do with what I want with:</p>
  
  <pre><code># ( (767, 3961, 0, 51), ... )
  intermediate_ = ( tuple(r) for (i,r) in df.iterrows() if tuple(r)[:2] in set(mylist))
  
  # reconstruct a DataFrame
  subdf = DataFrame(intermediate_, columns = ['user', 'brand', 'action', ..])
  </code></pre>
  
  <p>This works but is awkward and slow. What is the recommended way in <code>pandas</code>?</p>