I have a complicated Json File that looks like this:
{
"User A" : {
"Obj1" : {
"key1": "val1",
"key2": "val2",
"key3": "val3",
}
"Obj2" : {
"key1": "val1",
"key2": "val2",
"key3": "val3"
}
}
"User B" : {
"Obj1" : {
"key1": "val1",
"key2": "val2",
"key3": "val3",
"key4": "val4"
}
}
}
And I want to turn it into a dataframe that looks like this:
key1 key2 key3 key4
User A Obj1 val1 val2 val3 NaN
Obj2 val1 val2 val3 NaN
User B Obj1 val1 val2 val3 val4
Is this possible with pandas? If so, how can I manage to do it?
- If it's easier, I don't mind removing the first two columns of the User and the Obj, and just remain with the columns of the keys.