title: Pandas df.to_records() returns a 1d numpy array
body: <p>I apologize in advance if this question seems slightly naive. I am still learning about the interplay between pandas and numpy.</p>
  
  <p>I have a pandas DataFrame that I am trying to convert into an array for analysis using scikit-learn. I have tried df.values and df.to_records() to convert it, but for some reason, it changes the shape during the conversion.</p>
  
  <p>This is the first few lines of DataFrame (<code>df</code>) in Pandas.</p>
  
  <pre><code>Index           Code1    Code2       Code3
  0               99285    5921         5921
  1               99284     NaN         5921
  2               99284     NaN         4660
  3               99285   42789        42789
  4               99284   92321        92321
  5               99283     NaN        92321
  ...
  [94 rows x 3 columns]
  </code></pre>
  
  <p>However, if I call <code>df.values</code>, I get the following result, which, as far as I understand, is not an array as arrays are lists of tuples.</p>
  
  <pre><code>[['99285' '5921' '5921']
  ['99284' nan '5921']
  ['99284' nan '4660']
  ['99285' '42789' '42789']
  ['99284' '92321' '92321']
  ['99283' nan '92321']
  ...
  </code></pre>
  
  <p>If I call <code>df.to_records()</code>, I get the following result, which is an array, but not of the right shape as shown below.</p>
  
  <pre><code>[(0, '99285', '5921', '5921') (1, '99284', nan, '5921')
  (2, '99284', nan, '4660') (3, '99285', '42789', '42789')
  (4, '99284', '92321', '92321') (5, '99283', nan, '92321')
  ...
  &gt;&gt;&gt;df.to_records().shape
  (94,)
  </code></pre>
  
  <p>Can someone help me understand what I need to do to get an array with a shape of <code>(94,3)</code>?</p>
  
  <p>Important notes: The columns are all strings (and need to stay as strings), not ints, if that helps.</p>