title: Matricial (positional) indexing of DataFrames in Pandas
body: <p>Say I have the following dataframe:</p>
  <pre><code>tmp = np.random.randn(10,4)
  df = pd.DataFrame(tmp, index=pd.date_range('1/1/2012', periods=tmp.shape[0]), 
                   columns=['A', 'B', 'C', 'D'])
  
  &gt; b
                     A         B         C         D
  2012-01-01  0.471846  1.130041 -0.614117  0.882738
  2012-01-02 -1.431566  0.680617 -0.615331  0.288740
  2012-01-03  0.398567 -0.115388 -0.869855 -1.273666
  2012-01-04  0.379501  0.192329 -1.942184  0.694004
  2012-01-05  1.306329 -0.803856  0.417033 -0.655907
  2012-01-06 -0.599877  0.696549 -0.252789  1.367977
  2012-01-07 -1.618916  0.216571 -0.499880  0.386853
  2012-01-08  0.415002  0.139775  0.251842  0.021379
  2012-01-09  2.536787  0.737672 -0.740485 -0.890189
  2012-01-10 -1.553530 -0.100950 -0.237478 -0.295612
  </code></pre>
  <p>How can I do:</p>
  <ol>
  <li>Positional indexing of specific rows/columns? (and get the corresponding sub-<strong>dataframe</strong>)</li>
  <li>Positional indexing of ranges of rows/columns? (and get the corresponding sub-<strong>dataframe</strong>)</li>
  </ol>
  <h2>For single-entry matricial indexing:</h2>
  <p>For example, say I want to index the sub-dataframe in location <code>[1,2]</code> (in numpy &quot;matricial&quot; notation). The output should be:</p>
  <pre><code>                   C
  2012-01-02 -0.615331
  </code></pre>
  <p>I tried the following three methods, but none of them worked::</p>
  <pre><code>df[1,2]
  df[1][2]
  df.take([1])[2]
  </code></pre>
  <p>The only methods that work seem to be:</p>
  <pre><code>df.ix[1,2]
  df.irow(1)[2]
  </code></pre>
  <p>but:</p>
  <ul>
  <li><p>Using <code>.ix</code> for positional indexing is dangerous, since it would default to <strong>label indexing</strong> if my indices were integers (as opposed to dates as in the case above). See more on this here: <a href="https://stackoverflow.com/questions/15125961/startstop-slicing-inconsistencies-between-numpy-and-pandas">Start:stop slicing inconsistencies between numpy and Pandas?</a>.</p>
  </li>
  <li><p>Using <code>irow</code> is cumbersome, since it requires switching from <code>()</code> notation to <code>[]</code>notation (<code>irow</code> returns a <code>Series</code> object)</p>
  </li>
  </ul>
  <h2>For range matricial indexing:</h2>
  <p>For example, say I want to index elements in locations <code>[1:3,2:3]</code> in (numpy matricial notation). The output should be:</p>
  <pre><code>                   B
  2012-01-02 -0.615331  
  2012-01-03 -0.869855 
  </code></pre>
  <p>Note that I am <strong>excluding</strong> the <strong>stop indices</strong> (i.e. I am sticking to the numpy notation).</p>
  <p>Any thoughts?</p>