我正在尝试使用json_normalize在熊猫中解析Json。 问题是json结构不一致。
"AB": [
{
"createdAt": "2020-09-24T13:14:04",
"modifiedAt": "2020-09-24T13:17:56",
"id": 111,
"country": "US",
"gender": "MALE",
"customAttributes": {
"whatsAppDisplayName": "A"
},
"contactInformation": {
"phone": [
{
"number": "971"
}
]
}
}
]
这归一化为一个平面表,但contactInformation.phone列显示为
[
{
"number": "971"
}
]
如何将其标准化? 如果我使用record_path ='contactInformation.phone',尽管在meta列中我指定了contactInformation,phone等列,但我得到了keynot found错误。
任何想法