【发布时间】:2022-01-26 13:58:33
【问题描述】:
如何从这个 json 格式转换:
{
"Key1": {
"Value": "123",
"Value": "456",
},
"Key2" : {
"Value": "789",
},
"Key3": {
"Value": "000",
},
"Key4" : {
"Value": "111",
}
}
到这个 csv 格式:
|Col A|Col B|Col C|Col D|Col E|
Row 1|123 |456 |789 |000 |111 |
我想忽略键,只需将值添加到 csv 中,所有值都应该在一行中...我不需要任何标题或索引。只是价值观
【问题讨论】:
-
这不是有效的 JSON。字典中不能有相同的键。
-
StackOverflow 不是免费的编码服务。您应该try to solve the problem first,并显示您的代码。请更新您的问题以在minimal reproducible example 中显示您已经尝试过的内容。如需更多信息,请参阅How to Ask,并拨打tour。
标签: python json pandas csv row