title: Pandas select by index and filter by boolean mask
body: <p>I have the following dataframe </p>
  
  <pre><code>import pandas as pd
  
  test = pd.DataFrame()
  test['1'] = [12,23,34, 45]
  test['blah'] = ['a', 'b', 'c', 'e']
  test['a'] = [None, 1, 1, None]
  </code></pre>
  
  <p>I want to be able to select on this using both a boolean mask filtering and an index (that i define elsewhere), e.g. </p>
  
  <pre><code>test['a'] == 1  # filter
  
  ind = pd.RangeIndex(start=0, stop=4, step=2)  # pd index object
  </code></pre>
  
  <p>How can use them together? What I want to select (from index 2,4) </p>
  
  <pre><code>index   1       blah  a
  2       34      c     1.0
  </code></pre>
  
  <p>I tried this but pandas doesn't understand how to use the index and boolean mask together</p>
  
  <pre><code>test[test.loc[ind,:] &amp; test['a'] == 1] # Don't work
  </code></pre>