I have list of nested dictionary objects in a JSON file. I am trying to create a DataFrame of this file.
Here are the first 2 objects:
data= [ {
"model": "class",
"pk": 48,
"fields": {
"unique_key": "9f030ed1d5e56523",
"name": "john",
"follower_count": 2395,
"profile_image": " "
} } ,{
"model": "class",
"pk": 49,
"fields": {
"unique_key": "0e8256ad7f27270eb",
"name": "dais",
"follower_count": 264,
"profile_image": " "
} }, .....]
If I try something like:
df = pd.DataFrame(data)
This is what I get.
I was looking for help and I found this, but the problem is the list does not have a keys() function.