title: Filtering pandas data frame by a list of id's
body: <p>I have a pandas dataframe, which has a list of user id's 'subscriber_id' and some other info.</p>
  
  <p>I want to only select subscribers not in a given list A.</p>
  
  <p>So if our data frame contains info for subscribers [1,2,3,4,5] and my exclude list is [2,4,5], I should now get a dataframe with information for [1,3]</p>
  
  <p>I have tried using a mask as follows:</p>
  
  <p><code>temp = df.mask(lambda x: x['subscriber_id'] not in subscribers)</code></p>
  
  <p>but no luck!</p>
  
  <p>I am sure the <code>not in</code> is valid Python syntax, as I tested it on a list as follows:</p>
  
  <pre><code>c = [1,2,3,4,5]
  if 5 not in c:
      print 'YAY'
  &gt;&gt; YAY
  </code></pre>
  
  <p>Any suggestion or alternative way to filter the dataframe?</p>