title: Re-shape pandas dataframe stack/unstack
body: <pre><code>df = pd.DataFrame({'BORDER':['GERMANY','FRANCE','ITALY','USA','CANADA','MEXICO','INDIA','CHINA','JAPAN' ], 'ASID':[21, 32, 99, 77,66,55,44,88,111], 'HOUR1':[2 ,2 ,2 ,4 ,4 ,4 ,6 ,6, 6],'HOUR2':[3 ,3 ,3, 5 ,5 ,5, 7, 7, 7], 'HOUR3':[8 ,8 ,8, 12 ,12 ,12, 99, 99, 99], 'PRICE1':[2 ,2 ,2 ,4 ,4 ,4 ,6 ,6, 6], 'PRICE2':[2 ,2 ,2 ,4 ,4 ,4 ,6 ,6, 6],'PRICE3':[2 ,2 ,2 ,4 ,4 ,4 ,6 ,6, 6] })
  
  df = df[['ASID', 'BORDER', 'HOUR1', 'PRICE1', 'HOUR2', 'PRICE2', 'HOUR3', 'PRICE3']]
  </code></pre>
  
  <p>I've been trying to re-shape this dataframe for the past day. Tinkering with stack/unstack/melt and shifting columns into indicies etc, but have not been able to achieve my goal.</p>
  
  <p>The desired output has the following columns:</p>
  
  <pre><code>ASID, BORDER, HOUR, PRICE
  </code></pre>
  
  <p>I want to stack all of <code>['HOUR1', 'HOUR2', HOUR3']</code> into a single <code>column = HOUR</code>.</p>
  
  <p>Similarly, I want to stack all of <code>['PRICE1', 'PRICE2', 'PRICE3']</code> in a single <code>column = PRICE</code>, such that the value in this field is aligned with the corresponding value in the <code>HOUR</code> column. There is a link between <code>HOUR1</code> &amp; <code>PRICE1</code>, <code>HOUR2</code> &amp; <code>PRICE2</code>, <code>HOUR3</code> &amp; <code>PRICE3</code>.</p>
  
  <p>I appreciate any guidance you can provide. </p>