json - Series 类型的对象不是 JSON 可序列化的
问题描述
我有数据集,我想将此数据上传到 PostgreSQL 数据库,这是数据样本,这是熊猫数据框
key changes
LDELM27360 {'Access Control List': ['AUTO_CREATED', 'MANUAL_CREATED']}
LDELE47148 {'Access Control List': ['AUTO_CREATED', 'MANUAL_CREATED']}
LDELW24536 {'Access Control List': ['AUTO_CREATED', 'MANUAL_CREATED']}
LDELE34286 {'Access Control List': ['AUTO_CREATED', 'MANUAL_CREATED']}
当我上传更改列时,它给出错误 can't upload dict which can't serializable after search on stack overflow 他们建议使用
json.dumps()
但给出错误
Object of type Series is not JSON serializable
还有其他方法可以上传这些数据吗?
解决方案
推荐阅读
- java - Java.text.ParseException:无法解析的日期
- unity3d - 从服务器获取 AssetBundle 清单文件
- php - 如何从 2 个 URL 请求中一次性组合 2 个 json 响应
- elasticsearch - Vega 和 Kibana - 动态时间戳标签和过滤查询
- flutter - 如何使用 flutter_webview_plugin 播放视频
- r - R问题中的整数64到数据时间转换?
- angular - Nextcloud内部服务器错误Remote Address: 172.18.0.1 Request ID
- java - 我是否必须手动列出其中的所有子目录
在 Java POM 中 - swagger - 如何删除 swagger production .net core 2.1
- sql - 调度查询以在 SQL Developer 中导出 CSV 的调度运行