title: creating df to generate json in the given format
body: <p>I am trying to generate a df to produce this below json.</p>
  
  <p>Json data:</p>
  
  <pre><code>{
   "name": "flare",
   "children":  [
      {
       "name": "K1",
       "children": [
        {"name": "Exact", "size": 4},
        {"name": "synonyms", "size": 14}
       ]
      },
      {
       "name": "K2",
       "children": [
        {"name": "Exact", "size": 10},
        {"name": "synonyms", "size": 20}
       ]
      },
       {
       "name": "K3",
       "children": [
        {"name": "Exact", "size": 0},
        {"name": "synonyms", "size": 5}
       ]
      }, 
      {
       "name": "K4",
       "children": [
        {"name": "Exact", "size": 13},
        {"name": "synonyms", "size": 15}
       ]
      },
      {
       "name": "K5",
       "children": [
        {"name": "Exact", "size": 0},
        {"name": "synonyms", "size": 0}
       ]
      }
   ]
  }
  </code></pre>
  
  <p>input data:</p>
  
  <pre><code>name    Exact   synonyms
  K1        4       14
  K2        10      20
  K3        0       5
  K4        13      15
  K5        0       0
  </code></pre>
  
  <p>I tried creating df with values in the json but I was not able to get the desired json on df.to_json, please help.</p>