title: How to import complex dict into pandas?
body: <p>I have this data extracted from an XML file:</p>
  
  <pre><code>d = {
      'test1': {
          0: {'a': {'min': 1, 'mid': 12, 'max': 13},
              'b': {'min': 2, 'mid': 22, 'max': 23}},
          3: {'a': {'min': 3, 'mid': 32, 'max': 33},
              'b': {'min': 4, 'mid': 42, 'max': 43}},
          8: {'a': {'min': 5, 'mid': 52, 'max': 53},
              'b': {'min': 6, 'mid': 62, 'max': 63}},            
      },
      'test2': {
          0: {'a': {'min': 9, 'mid': 12, 'max': 13},
              'b': {'min': 8, 'mid': 22, 'max': 23}},
          3: {'a': {'min': 7, 'mid': 32, 'max': 33},
              'b': {'min': 6, 'mid': 42, 'max': 43}},
          8: {'a': {'min': 5, 'mid': 52, 'max': 53},
              'b': {'min': 4, 'mid': 62, 'max': 63}},           
      },
  }
  </code></pre>
  
  <p>And I imported it with: </p>
  
  <pre><code>ds = pd.DataFrame.from_dict(d)
  </code></pre>
  
  <p>I would like to name my columns then start browsing my data. </p>
  
  <p>The columns are: <code>['Tests', 'Id', 'Item']</code></p>
  
  <p>For example I would like to get all the <code>mid</code> value for all Tests, any Item and any Id. So I naively wrote:</p>
  
  <pre><code>ds[:,:,:,'min'] 
  </code></pre>
  
  <p>But obviously it doesn't work. </p>
  
  <p>Also I am afraid the dataframe is not represented like it supposed to. What to do to make it like this? </p>
  
  <pre><code>+-------+----+------+-----+-----+-----+
  |       |    |      | min | mid | max |
  +-------+----+------+-----+-----+-----+
  | Tests | Id | Item |     |     |     |
  +-------+----+------+-----+-----+-----+
  |       | 0  |  a   |  1  | 12  | 13  |
  |       |    |  b   |  2  | 22  | 23  |
  + test1 +----+------+-----+-----+-----+
  |       | 1  |  a   |  3  | 32  | 33  |
  |       |    |  b   |  4  | 42  | 43  |
  +-------+----+------+-----+-----+-----+
  |       | 0  |  a   |  9  | 12  | 13  |
  |       |    |  b   |  8  | 22  | 23  |
  + test2 +----+------+-----+-----+-----+
  |       | 1  |  a   |  7  | 32  | 33  |
  |       |    |  b   |  6  | 42  | 43  |
  +-------+----+------+-----+-----+-----+
  </code></pre>