0

I have a deeply nested JSON file taken from IBM's personality analysis tool. What is the shortest way I can create a DataFrame out of it. It doesn't matter if the parent "key" is repeated in multiple rows. I can use multi indexing to make it look good. My primary concern is to make spread out the JSON into a dataframe. Here is the link to the JSON: https://api.myjson.com/bins/vmdaf

SarthakC
  • 455
  • 4
  • 6
  • https://stackoverflow.com/questions/21104592/json-to-pandas-dataframe – Mr_U4913 Jul 17 '17 at 21:04
  • 1
    Consider providing a small but reproducible sample JSON data set and a desired DF. Please read [how to make good reproducible pandas examples](http://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) and edit your post correspondingly. – MaxU - stand with Ukraine Jul 17 '17 at 21:47

1 Answers1

0

The json_normalize function is most likely what can help you out most here.

 from pandas.io.json import json_normalize

 df = json_normalize(my_json_blob)
Mr_U4913
  • 1,294
  • 8
  • 12
unique_beast
  • 1,379
  • 2
  • 11
  • 23
  • It does split the json with respect to the tier 1 of its hierarchy, thanks. But the json that I have has 2 more level to go. – SarthakC Jul 17 '17 at 20:59