title: Boolean mask for Pandas DataFrame columns
body: <p>My aim is to use boolean mask to get useful columns from DataFrame.</p>
  
  <p>I try such snippet of code:</p>
  
  <pre><code>df = pd.DataFrame({'a': [1,2,3,4,5], 'b': [101, 101, 102, 101, 102], 'c': [23, 12, 54, 65, 21]})
  mask = [True, False, True]
  df.columns[mask]
  </code></pre>
  
  <p>And the result is what I actually need:</p>
  
  <pre><code>Index([u'a', u'c'], dtype='object')
  </code></pre>
  
  <p>Then I try the same code but with another mask:</p>
  
  <pre><code>mask_i = [1, 0, 1]
  
  df = pd.DataFrame({'a': [1,2,3,4,5], 'b': [101, 101, 102, 101, 102], 'c': [23, 12, 54, 65, 21]})
  mask_i = [1, 0, 1]
  df.columns[mask]
  </code></pre>
  
  <p>I expected the same result, but get all indexes:</p>
  
  <pre><code>Index([u'b', u'a', u'b'], dtype='object')
  </code></pre>
  
  <p>Then I check: </p>
  
  <pre><code>mask_i = [1, 0, 1]
  mask = [True, False, True]
  print mask == mask_i`
  
  # Result: `True`
  </code></pre>
  
  <p>Can somebody explain please why masks are equal but I get different results.</p>