title: Pandas DataFrame to JSON format file
body: <p>I am trying to generate a text file with the following format:</p>
  
  <pre><code>{"0": ["n01440764", "tench"], "1": ["n01443537", "goldfish"], "2": ["n01484850", "great_white_shark"]}
  </code></pre>
  
  <p>I have input data in a DataFrame:</p>
  
  <pre><code>data = [('n02124075', 'egyptian_cat'),
   ('n04067472', 'reel'),
   ('n04540053', 'volleyball')]
  df = pd.DataFrame(data)
  df.head(n=2)
  
      0   1
  0   n02124075   egyptian_cat
  1   n04067472   reel
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>df.to_json(PATH/'my_file.json', orient='index')
  
  json_f = json.dumps(df.to_dict(orient='list'))
  with open(PATH/'my_file.json', 'w') as outfile:
      json.dump(json_tiny, outfile)
  </code></pre>
  
  <p>and various variations of these but cant work out how to generate output file with correct format. Ant ideas?</p>