title: Using .loc with a MultiIndex in pandas
body: <p>Does anyone know if it is possible to use the <code>DataFrame.loc</code> method to select from a <code>MultiIndex</code>? I have the following <code>DataFrame</code> and would like to be able to access the values located in the <code>Dwell</code> columns, at the indices of <code>('at', 1)</code>, <code>('at', 3)</code>, <code>('at', 5)</code>, and so on (non-sequential).</p>
  <p>I'd love to be able to do something like <code>data.loc[['at',[1,3,5]], 'Dwell']</code>, similar to the <code>data.loc[[1,3,5], 'Dwell']</code> syntax for a regular index (which returns a 3-member series of <code>Dwell</code> values).</p>
  <p>My purpose is to select an arbitrary subset of the data, perform some analysis only on that subset, and then update the new values with the results of the analysis. I plan on using the same syntax to set new values for these data, so chaining selectors wouldn't really work in this case.</p>
  <p>Here is a slice of the <code>DataFrame</code> I'm working with:</p>
  <pre><code>         Char    Dwell  Flight  ND_Offset  Offset
  QGram                                                           
  at    0     a      100     120   0.000000       0  
        1     t      180       0   0.108363       5  
        2     a      100     120   0.000000       0 
        3     t      180       0   0.108363       5 
        4     a       20     180   0.000000       0  
        5     t       80     120   0.108363       5
        6     a       20     180   0.000000       0   
        7     t       80     120   0.108363       5  
        8     a       20     180   0.000000       0  
        9     t       80     120   0.108363       5   
        10    a      120     180   0.000000       0  
  </code></pre>