title: How can I preserve DataFrame index names when using to_json in pandas?
body: <p>Right now I have a DataFrame <code>df2</code> that looks like this:</p>
  
  <pre><code>       Kuwaiti  Non-Kuwaiti   Total
  Age                                
  0-4     164483       156459  320942
  5-9     158377       136935  295312
  </code></pre>
  
  <p>When I do:</p>
  
  <pre><code>df2.to_json()
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>'{"Kuwaiti":{"0-4":164483,"5-9":158377},"Non-Kuwaiti":{"0-4":156459,"5-9":136935},"Total":{"0-4":320942,"5-9":295312}}'
  </code></pre>
  
  <p>As you can see, <code>df2.index.name</code> is not preserved anywhere.</p>
  
  <p>What can I do to preserve the index name?</p>