title: Pandas DataFrame with MultiIndex to Numpy Matrix
body: <p>I have a pandas DataFrame with 2 indexes. (MultiIndex) I want to get out a Numpy  Matrix with something like <code>df.as_matrix(...)</code> but this matrix has shape <code>(n_rows, 1)</code>. I want a matrix of shape <code>(n_index1_rows, n_index2_rows, 1)</code>. </p>
  
  <p>Is there a way to use <code>.groupby(...)</code> then a <code>.values.tolist()</code> or <code>.as_matrix(...)</code> to get the desired shape?</p>
  
  <p><strong>EDIT</strong>: Data</p>
  
  <pre><code>                                                              value  
  current_date                  temp_date                                        
  1970-01-01 00:00:01.446237485 1970-01-01 00:00:01.446237489   30.497100   
                                1970-01-01 00:00:01.446237494    9.584300   
                                1970-01-01 00:00:01.446237455   10.134200   
                                1970-01-01 00:00:01.446237494    7.803683   
                                1970-01-01 00:00:01.446237400   10.678700   
                                1970-01-01 00:00:01.446237373    9.700000   
                                1970-01-01 00:00:01.446237180   15.000000   
                                1970-01-01 00:00:01.446236961   12.928866   
                                1970-01-01 00:00:01.446237032   10.458800
  </code></pre>
  
  <p>This is kind of the idea:</p>
  
  <pre><code>np.array([np.resize(x.as_matrix(["value"]).copy(), (500, 1)) for (i, x) in df.reset_index("current_date").groupby("current_date")])
  </code></pre>