title: Converting multiple DataFrames into a Panel
body: <p>I have tons of excel files. Each of these files contains one or more variables <strong>for all subjects at a certain point in time</strong>. For each variable, I have, say, 10 files (storing the value of the variable at 10 different points in time). My ultimate goal is to set up a panel series.</p>
  
  <p>Suppose there is only one variable in each file. For each variable (or item), I initialize an empty DataFrame <code>item = pd.DataFrame()</code> and successively read and append all 10 files into that empty DataFrame <code>item = item.append(pd.DataFrame(df))</code>, where df is from the new file. Each of those 10 DataFrames has dimension <code>1 x #subjects</code>, thus I eventually have <code>10 x #subject</code>. I turn this into a panel frame using <code>pf = pd.Panel({'variable name': item})</code>. Now, I can easily add this to a big panel frame with many other items...</p>
  
  <p><strong>Question</strong>: What is an <strong>easy and practical way</strong> to approach this problem if I have 2 or more variables in each file? If I stuck to the above approach, I would have a DataFrame of dimension <code>#variables x #subjects</code> for each file, leading to </p>
  
  <pre><code>                 subject1    subject2
  variable1 2000        val         val
  variable2 2000        val         val
  variable1 2001        val         val
  variable2 2001        val         val
  ...
  </code></pre>
  
  <p>after appending them. This is obviously a bad structure to convert this into panel data.</p>
  
  <p>I could work myself around it - e.g. by appending to "the correct line" to keep the appropriate structure or reading the same file as many times as it has variables - but this would be cumbersome and/or costly. There have to be methods that do this work easily, but I couldn't find them in the docs.</p>
  
  <p>Thanks for your help.</p>