i am trying to use normalize function to convert json to data frame using json_normalize. This is the json i am working with
data = {
"Parent":
[
{
"Attributes":
[
{
"Values": [{
"Month": "Jan",
"Value": "100"
}],
"Id": "90",
"CustId": "3"
},
{
"Values": [{
"Month": "Jan",
"Value": "101"
}],
"Id": "88"
},
{
"Values": [{
"Month": "Jan",
"Value": "102"
}],
"Id": "89"
}
],
"DId": "1234"
},
{
"Attributes":
[
{
"Values": [{
"Month": "Jan",
"Value": "200"
}],
"Id": "90",
"CustId": "3"
},
{
"Values": [{
"Month": "Jan",
"Value": "201"
}],
"Id": "88"
},
{
"Values": [{
"Month": "Jan",
"Value": "202"
}],
"Id": "89"
}
],
"DId": "5678"
}
]
}
and this is what i have tried
print(type(data))
result = pd.json_normalize(data, record_path=['Parent',['Attributes']], max_level=2)
print(result.to_string())
And it gave the result , but it is missing the DId and values column is still a list of dict

And this is what i want to achieve
Any guidance how to accomplish it would be highly appreciated.

