title: Convert class 'pandas.indexes.numeric.Int64Index' to numpy
body: <p>I am isolating some row ids from a Pandas dataframe, like this: </p>
  
  <pre><code>data = df.loc[df.cell == id]
  rows = df.index
  
  print(type(rows))
  &lt; class 'pandas.indexes.numeric.Int64Index'&gt;
  </code></pre>
  
  <p>I want to convert rows to a numpy array so I can save it to a mat file using sio.savemat. This is returning an error though:</p>
  
  <pre><code>row_mat = rows.as_matrix()
  AttributeError: 'Int64Index' object has no attribute 'as_matrix'
  </code></pre>
  
  <p>What is the correct way, please? Thanks</p>