title: Pandas PIVOT Dataframe and combine columns names by levels
body: <p>I have a DataFrame like this:</p>
  <pre><code>df_dict = dict(
          key1 = [a,a,b,a,a,b,b,a,a,b,b],
          key2 = [A,B,B,A,B,A,B,A,B,A,B],
          level = [leve1,leve1,leve1,leve2,leve2,leve2,leve2,level3,level3,level3,level3],
          var1 = [1,8,20,4,10,16,22,6,12,18,24]
          var2 = [2,9,21,5,11,17,23,7,13,19,25]
          )
  
  df = pd.DataFrame(df_dict)
  
  </code></pre>
  <p>I want to pivot my table in order to have the var's columns per each level. The output that I expect would looks like this:</p>
  <pre><code>key 1 | key 2 | leve1_var1 | leve1_var2 | leve2_var1 | leve2_var2 | level3_var1 | level3_var2 |
  ______________________________________________________________________________________________|
  a     | A     | 1          | 2          | 4          | 5          | 6           | 7           |
  a     | B     | 8          | 9          | 10         | 11         | 12          | 13          |
  b     | A     | 0          | 0          | 16         | 17         | 18          | 19          |
  b     | B     | 20         | 21         | 22         | 23         | 24          | 25          |
  </code></pre>
  <p>I tried with</p>
  <pre><code>df.pivot_table(index=['key1','key2'],columns='level')
  </code></pre>
  <p>But it gives me first the variables and per each variable the levels, and I want to have all the variables for the same level together. Also, I have not been able to solve the problem of combining the labels of the level + '_'+ variable. Note that in the output zero is filled in the combinations that do not exist.</p>