【发布时间】:2021-01-06 01:36:10
【问题描述】:
我有一个 JSON 文件
response ={
"classifier_id": "xxxxx-xx-1",
"url": "/testers/xxxxx-xx-1",
"collection": [
{
"text": "How hot will it be today?",
"top_class": "temperature",
"classes": [
{
"class_name": "temperature",
"confidence": 0.993
},
{
"class_name": "conditions",
"confidence": 0.006
}
]
},
{
"text": "Is it hot outside?",
"top_class": "temperature",
"classes": [
{
"class_name": "temperature",
"confidence": 1.0
},
{
"class_name": "conditions",
"confidence": 0.0
}
]
}
]
}
电流输出
代码和不需要的输出
我试过json_normalize,但是它给出了重复。
如何将此 Jason 文件转换为 Pandas DataFrame?
每个集合的记录应该扩大,而不是很长。
【问题讨论】:
标签: python json pandas dataframe normalize