title: Slicing data based on column in dataframe
body: <p>I have a DataFrame like this:</p>
  
  <pre><code>Month   Day Year    TmaxF
   4       1  1912    56.00
   4       2  1912    56.00
   4       3  1912    74.00
   1       1  1913    38
   1       2  1913    28
   1       3  1913    21
   1       1  1914    30.00
   1       2  1914    31.00
   1       3  1914    20.00
  </code></pre>
  
  <p>and I want to only select data that is in the years 1913 and 1914.  <code>.isin</code> isn't what I want here because this is a simplified dataset.</p>
  
  <p>I am more looking for something like:</p>
  
  <pre><code>df.loc['1913':'1914'] 
  </code></pre>
  
  <p>but when I set <code>Year</code> as the index and run this code it returns the error:</p>
  
  <pre><code>TypeError: cannot do slice indexing on &lt;class 'pandas.core.index.Int64Index'&gt; with these indexers [1913] of &lt;type 'str'&gt;
  </code></pre>
  
  <p>df.info() returns:</p>
  
  <pre><code>Month     36397 non-null int64
  Day       36397 non-null int64
  Year      36397 non-null int64
  TmaxF     35600 non-null float64
  </code></pre>