title: Pandas stack unstack pivot hierarchical index - reshape dataframe
body: <p>I have massaged a dataframe so it looks like this:</p>
  
  <pre><code>123
  456
  789
  0AB
  CDE
  FGH
  ...
  ,,,
  </code></pre>
  
  <p>I would like to transform it, so it looks like this:</p>
  
  <pre><code>123789CDE...
  4560ABFGH,,,
  </code></pre>
  
  <p>The pattern is this:</p>
  
  <pre><code>123 789 CDE ...
  456 0AB FGH ,,,
  </code></pre>
  
  <p>That is, I take two rows and concatenate the next two rows, etc, so I get a wide dataframe.</p>
  
  <p>But my real dataframe is not three columns, it is maybe 50 columns, and maybe 100,000 rows, so my dataframe is 100,000 x 50 big. I want to take 100 rows, and concatenate the next 100 rows, etc so I get a wide dataframe with dimension 100 x (50 * 100,000/100) = 100 x 50,000.</p>
  
  <p>Can Pandas do this? My aim is to do some calculations on each of these 100 rows. Or is hierarchical indexing better?</p>