title: .loc for CategoricalIndex in Pandas
body: <p>I'm trying to access the rows of a CategoricalIndex-based Pandas dataframe using .loc but I get a <code>TypeError</code>. A minimum <strong>non</strong> working example would be</p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({'foo': rand(3), 'future_index': [22, 13, 87]})
  df['future_index'] = df['future_index'].astype('category')
  df = df.set_index('future_index')
  </code></pre>
  
  <p>Then, in trying to access the row corresponding to label 13 as</p>
  
  <pre><code>df.loc[13]
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>TypeError: cannot do label indexing on &lt;class 'pandas.core.indexes.category.CategoricalIndex'&gt; with these indexers [13] of &lt;class 'int'&gt;
  </code></pre>
  
  <p>despite</p>
  
  <pre><code>13 in df.index
  </code></pre>
  
  <p>being <code>True</code>. I know I can ultimately obtain the index of 13 with</p>
  
  <pre><code>df.index.get_loc(13)
  </code></pre>
  
  <p>but, why is the above easier approach not working? What am I missing?</p>
  
  <p>Cheers.</p>