title: Parse JSON to Excel - Pandas + xlwt
body: <p>I'm kind of half way through this functionality. However, I need some help with formatting the data in the sheet that contains the output.</p>
  
  <p>My current code...</p>
  
  <pre><code>response = {"sic2":[{"confidence":1.0,"label":"73"}],"sic4":[{"confidence":0.5,"label":"7310"}],"sic8":[{"confidence":0.5,"label":"73101000"},{"confidence":0.25,"label":"73102000"},{"confidence":0.25,"label":"73109999"}]}
  
  
  # Create a Pandas dataframe from the data.
  df = pd.DataFrame.from_dict(json.loads(response), orient='index')
  
  # Create a Pandas Excel writer using XlsxWriter as the engine.
  writer = pd.ExcelWriter('pandas_simple.xlsx', engine='xlsxwriter')
  
  # Convert the dataframe to an XlsxWriter Excel object.
  df.to_excel(writer, sheet_name='Sheet1')
  
  # Close the Pandas Excel writer and output the Excel file.
  writer.save()
  </code></pre>
  
  <p>The output is as follows...
  <a href="https://i.stack.imgur.com/YMpUi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YMpUi.png" alt="enter image description here"></a></p>
  
  <p>What I want is something like this...</p>
  
  <p><a href="https://i.stack.imgur.com/O7y87.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O7y87.png" alt="enter image description here"></a></p>
  
  <p>I suppose that first I would need to extract and organise the headers.
  This would also include manually assigning a header for a column that cannot have a header by default as in case of SIC column.</p>
  
  <p>After that, I can feed data to the columns with their respective headers.</p>