title: How to convert nested dictionary into a 2D table
body: <p>How to convert nested dictionary into a 2D table</p>
  
  <p><strong>data[0]</strong> is a collection of table rows</p>
  
  <p><strong>data[0][0]</strong> is a table row, </p>
  
  <p><strong>key:year</strong> is the column name, </p>
  
  <p><strong>key:values</strong> is the values in the column.</p>
  
  <p>I want to recover the <strong>data[0]</strong> into tablular form in Pandas dataframe.</p>
  
  <p>I found the <strong>json_normalize</strong> may help, but not knowing how to do it.</p>
  
  <p>any suggestions ?</p>
  
  <h2>Expected format</h2>
  
  <p><img src="https://i.imgur.com/yx24q0E.png" alt=""></p>
  
  <h2>Raw data in dictionary</h2>
  
  <pre><code>(Pdb++) data[0]
      [{u'values': [{u'Actual': u'(0.2)'}, {u'Upper End of Range': u'-'}, {u'Upper End of Central Tendency': u'-'}, {u'Lower End of Central Tendency': u'-'}, {u'Lower End of Range': u'-'}], u'year': u'2009'}, {u'values': [{u'Actual': u'2.8'}, {u'Upper End of Range': u'-'}, {u'Upper End of Central Tendency': u'-'}, {u'Lower End of Central Tendency': u'-'}, {u'Lower End of Range': u'-'}], u'year': u'2010'}, {u'values': [{u'Actual': u'2.0'}, {u'Upper End of Range': u'-'}, {u'Upper End of Central Tendency': u'-'}, {u'Lower End of Central Tendency': u'-'}, {u'Lower End of Range': u'-'}], u'year': u'2011'}, {u'values': [{u'Actual': u'2.0'}, {u'Upper End of Range': u'-'}, {u'Upper End of Central Tendency': u'-'}, {u'Lower End of Central Tendency': u'-'}, {u'Lower End of Range': u'-'}], u'year': u'2012'}, {u'values': [{u'Actual': u'2.5'}, {u'Upper End of Range': u'-'}, {u'Upper End of Central Tendency': u'-'}, {u'Lower End of Central Tendency': u'-'}, {u'Lower End of Range': u'-'}], u'year': u'2013'}, {u'values': [{u'Actual': u'-'}, {u'Upper End of Range': u'3.0'}, {u'Upper End of Central Tendency': u'3.0'}, {u'Lower End of Central Tendency': u'2.8'}, {u'Lower End of Range': u'2.1'}], u'year': u'2014'}, {u'values': [{u'Actual': u'-'}, {u'Upper End of Range': u'3.5'}, {u'Upper End of Central Tendency': u'3.2'}, {u'Lower End of Central Tendency': u'3.0'}, {u'Lower End of Range': u'2.2'}], u'year': u'2015'}, {u'values': [{u'Actual': u'-'}, {u'Upper End of Range': u'3.4'}, {u'Upper End of Central Tendency': u'3.0'}, {u'Lower End of Central Tendency': u'2.5'}, {u'Lower End of Range': u'2.2'}], u'year': u'2016'}, {u'values': [{u'Actual': u'-'}, {u'Upper End of Range': u'2.4'}, {u'Upper End of Central Tendency': u'2.3'}, {u'Lower End of Central Tendency': u'2.2'}, {u'Lower End of Range': u'1.8'}], u'year': u'Longer Run'}]
  
  (Pdb++) data[0][0]
  {u'values': [{u'Actual': u'(0.2)'}, {u'Upper End of Range': u'-'}, {u'Upper End of Central Tendency': u'-'}, {u'Lower End of Central Tendency': u'-'}, {u'Lower End of Range': u'-'}], u'year': u'2009'}
  </code></pre>
  
  <p>Maybe  to change the JSON schema will be a better solution ? </p>
  
  <p>if so, what kind of NEW JSON schema design is better for the kind of table data. thanks</p>