title: Pandas .stack() issue
body: <p>I have been trying to use pandas to do a simple stack and it seems I am missing something.</p>
  <p>I have a csv file in this format
  <a href="https://i.stack.imgur.com/ZCQgT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZCQgT.png" alt="enter image description here" /></a></p>
  <p>I thought I would use stack to get this</p>
  <p><a href="https://i.stack.imgur.com/5Mwy8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5Mwy8.png" alt="enter image description here" /></a></p>
  <p>The number of columns and number of items will vary</p>
  <pre><code>df = pd.read_csv(&quot;z-textsource.csv&quot;)
  data_stacked = df.stack()
  data_stacked.to_csv(&quot;z-textsource_stacked.csv&quot;)
  </code></pre>
  <p>However, when I run the code I get this</p>
  <p><a href="https://i.stack.imgur.com/tuywx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tuywx.png" alt="enter image description here" /></a></p>
  <p>Many thanks in advance!</p>