title: pandas: iterative filtering a DataFrame's rows
body: <p>Suppose I have a <code>DataFrame</code> like so,</p>
  
  <pre><code>df = pd.DataFrame([['x', 1, 2], ['x', 1, 3], ['y', 2, 2]], 
                    columns=['a', 'b', 'c'])
  </code></pre>
  
  <p>To select all rows where <code>c == 2</code> and <code>a == 'x'</code>, I could do something like,</p>
  
  <pre><code>df[(df['a'] == 'x') &amp; (df['c'] == 2)]
  </code></pre>
  
  <p>Or I could iterative refine by making temporary variables,</p>
  
  <pre><code>df1 = df[df['a'] == 'x']
  df2 = df1[df1['c'] == 2]
  </code></pre>
  
  <p>Is there a way to iterative refine on rows?</p>
  
  <pre><code>(
    df
    .refine(lambda row: row['a'] == 'x')     # this method doesn't exist
    .refine(lambda row: row['c'] == 2)
  )
  </code></pre>