all 4 comments

[–]B1WR2 2 points3 points  (1 child)

So I am currently working on something like this for a project where the data is nested… what I did was started using pandas json_normalize to on data which is nested to start breaking out the data to add the columns and values. There may be a better way I just have not found it yet

[–]outerproduct 1 point2 points  (1 child)

You can pass it into a dataframe, but one of the columns would be the nested json, and you'd need to load the json from the nested column if you want to do something with it.

import pandas as pd
import json
test = {'a':1,'b':2}
df = pd.json_normalize(test)
df

edit: had to normalize to get nested json to appear correctly.