title: How to slice a Pandas Data Frame by position?
body: <p>I have a Pandas Data Frame object that has 1000 rows and 10 columns. I would simply like to slice the Data Frame and take the first 10 rows. How can I do this? I've been trying to use this:</p>
  
  <pre><code>&gt;&gt;&gt; df.shape
  (1000,10)
  &gt;&gt;&gt; my_slice = df.ix[10,:]
  &gt;&gt;&gt; my_slice.shape
  (10,)
  </code></pre>
  
  <p>Shouldn't my_slice be the first ten rows, ie. a 10 x 10 Data Frame? How can I get the first ten rows, such that <code>my_slice</code> is a 10x10 Data Frame object? Thanks.</p>