我所拥有的是来自 monday.com 通过 graphql 查询的结果。数据返回许多不同的集合,例如字典列表的字典......例如。
{
"data": {
"boards": [
{
"name": "board name",
"groups": [
{"title": "group title 1"},
{"title": "group title 2"},
{"title": "group title 3"},
{"title": "group title 4"}
]
}
]
},
"account_id": "0000000"
}
dataframe
我想做一只熊猫
group.board group.title
0 'board_name' 'group title 1'
1 'board_name' 'group title 2'
2 'board_name' 'group title 3'
3 'board_name' 'group title 4'
我试过了
pd.json_normalize(json_data, 'boards')
但我不断收到 KeyError: 'boards'