title: How to get numpy arrays indexing equivalent in pandas data frame?
body: <p>I have a numpy <strong>array</strong> as following:</p>
  
  <pre><code>    array([[1, 2],
             [3, 4],
             [5, 6],
             [7, 8]])
  </code></pre>
  
  <p>The array is called myArray, and I perform two indexing operations on the 2D array and get following results:</p>
  
  <pre><code>    In[1]: a1 = myArray[1:]
             a1
  
      Out[1]:array([[3, 4],
                   [5, 6],
                   [7, 8]])
  
  
      In[2]: a2 = myArray[:-1]
             a2
  
      Out[2]:array([[1, 2],
                    [3, 4],
                    [5, 6]])
  </code></pre>
  
  <p>Now, I have the same data in the form of a pandas df in two columns, let the data frame be df</p>
  
  <pre><code>      x    y
     0  1    2
     1  3    4
     3  5    6
     4  7    8
  </code></pre>
  
  <p>How to do the equivalent indexing/ slicing on two columns to get the same results as above for a1 and a2.</p>