The right way to query a pandas MultiIndex
<p>I've got a huge dataframe (13 million rows) which stocks and stock prices in. I've indexed them using <code>MultiIndex(['stock', 'date'])</code>, where <code>date</code> has been parsed as a <code>DateTime</code>.</p>

<p>This means I can select price data based upon stock easily <code>df.loc['AAPL']</code>, and by specific day <code>df.loc['AAPL'].loc['2015-05-05']</code>.</p>

<p>What I want to know is, what is the fastest and most elegant accessor for getting all stock prices on a particular day (i.e. if the indices were reversed).</p>

<p>Currently I'm using <code>df.xs("2015-05-05", level=1)</code> - is that the right way? Is there a better/cleaner/faster way?</p>