title: Python Panel Data
body: <p>I am usually using Stata but now want to use Python and desperately trying to create a pandel data set. I tried pandas.panel but do not get it to work. 
  I have the following dataset:</p>
  
  <pre><code>  date  id1   id2
    2000  100   50
    2001  101   48
  </code></pre>
  
  <p>Now I want to make it look like this:</p>
  
  <pre><code>    date  id   variable
      2000   1    100
      2000   2    101
      2001   1    50
      2001   2    48
  </code></pre>
  
  <p>Next, I want to identify a time and id variable to run some panel function. I also tried dataframe.stack(), but this doesn't sort according to the id. How do I do this or am I missing some nice time-series function in pandas here?</p>
  
  <p>Sorry for the question. I am sure this has been answered somewhere, but I tried several hours now and cannot figure it out.</p>