title: Pandas Split DataFrame using row index
body: <p>I want to split dataframe by uneven number of rows using row index.  </p>
  
  <p>The below code:</p>
  
  <pre><code>groups = df.groupby((np.arange(len(df.index))/l[1]).astype(int))
  </code></pre>
  
  <p>works only for uniform number of rows.</p>
  
  <pre><code>df
  
  a b c  
  1 1 1  
  2 2 2  
  3 3 3  
  4 4 4  
  5 5 5  
  6 6 6  
  7 7 7  
  
  l = [2, 5, 7]
  
  df1  
  1 1 1  
  2 2 2  
  
  df2  
  3,3,3  
  4,4,4  
  5,5,5  
  
  df3  
  6,6,6  
  7,7,7  
  
  df4  
  8,8,8
  </code></pre>