pandas通过sqlalchemy写入pgsql报错can't adapt type 'numpy.int64'
其实以前也遇到过,后来不了了之,但今天又出现了,还是大概记录下。
我个人习惯按我自己的理解搞事情,只要结果对就行,但不一定对。
分析下原因,突然想到dataframe中有一列全是列表,列表中全是整数,
估计就是这货引起的,后来把列表那列改为字符串就没啥问题了,
而且也有其他列是整数的,所以原因应该是不能直接使用python列表对象,
这确实不是个好习惯,不要这么干。
pandas通过sqlalchemy写入pgsql报错can't adapt type 'numpy.int64'的更多相关文章
- 写入MySQL报错超出 max_allowed_packet 的问题
写入MySQL报错超出 max_allowed_packet 的问题. MySQL会根据配置文件会限制server接受的数据包的大小.如果写入大数据时,因为默认的配置太小,插入和更新操作会因为 max ...
- SQL删除重复数据(根据多个字段),pandas的nan存入数据库报错
delete from M_FACTOR_DATA_TEST a where (a.factor_id,a.data_date,a.stock_code) in (select factor_id,d ...
- go语言byte类型报错cannot use "c" (type string) as type byte in assignment
练习Go修改字符串的时候遇到这个问题:cannot use "c" (type string) as type byte in assignment,代码如下: package m ...
- 报错: Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library
报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...
- Python报错ModuleNotFoundError: No module named 'numpy'
转载:https://blog.csdn.net/qq_39779233/article/details/103224712 Python报错ModuleNotFoundError: No modul ...
- Linux mount挂载磁盘报错 mount: wrong fs type, bad option, bad superblock on /dev/vdb
Linux mount挂载磁盘报错 mount: wrong fs type, bad option, bad superblock on /dev/vdb Linux挂载磁盘报如下错误: moun ...
- SparkSQL之dataframe写入mysql报错
一.异常情况及解决方案 在使用Spark SQL的dataframe数据写入到相应的MySQL表中时,报错,错误信息如下: 代码的基本形式为: df.write.jdbc(url, result_ta ...
- 爬取网页内容后写入文件报错UnicodeEncodeError: 'gbk' codec can't encode的问题解决方案
老猿使用如下代码读取网页内容: req = urllib.request.Request(url=url,headers=header) text = urllib.request.urlopen(r ...
- hadoop mapreduce 写入hbase报错 Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
现象:map任务构造数据正常,reduce任务,开始也正常,速度很快 ,在hbase 的管理界面,可以看到,5W以上的请求数 当reduce 执行到 70% 左右的时候,就堵住了,查看yarn的web ...
- hibernate报错Unknown integral data type for ids : java.lang.String
package com.model; // Generated 2016-10-27 14:02:17 by Hibernate Tools 4.3.1.Final /** * CmDept gene ...
随机推荐
- LeetCode-807 保持城市天际线
来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/max-increase-to-keep-city-skyline 题目描述 在二维数组grid ...
- pat乙级 1020 月饼
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> ...
- WPF 打印界面控件内容
public class PrintDialogHelper { private const string PrintServerName = "DESKTOP-49LV5U6"; ...
- Vue中实现异步加载的组件进行分割介绍
一,传统方式 如上图所示,不管我们前端页面是否访问了About组件的内容,打包之后的代码都会将其打包到js文件中,缺点:这样是无畏的增加了请求的负担,加载了我们不需要的js代码 如果运用webpack ...
- undrop-for-innodb
undrop是一款针对mysql innodb的数据恢复工具,通过扫描文件或磁盘设备,然后解析innodb数据页进而恢复丢失的数据,对于drop.truncate以及文件损坏都很有帮助.本文介绍dro ...
- 在Linux中实现打印目录程序遇到问题及解决
今日阅读Linux程序设计第四版时,书中给出了一段实例代码,功能为实现/home目录下各级目录结构,当然不一定非得是/home下目录才可以,任何一级目录都可以. 自己尝试在Ubuntu系统运行编译,实 ...
- vue 复制功能
实现: let message = ` ${name} 电话:${item.phone} 部门:${item.department} 职务: ${item.post} 邮箱:${item.email} ...
- Aspose.Cells 拒绝访问、数据库 64 bit mode with the 32 bit Oracle、视图加载格式不正确。
第一次遇到发布程序后,引发的这么多奇葩问题.记录一下. 配置:windows server 2018 R2 企业版 sp1 这是一台闲置4年机子,拿到机子里面已经安装过oracle客户端,我直接卸载装 ...
- springcloud 整合email的坑(Unrecognized SSL message, plaintext connection?)
springcloud整合email真的是搞得我脑壳痛,因为我需要注册的时候通过rabbitmq给用户发一封邮件,因为这个报错的原因导致我mq一直监听失败然后就开始了循环发消息,这就导致邮箱一直在不停 ...
- 关于java业务限流组件的应用推广
可参考的链接如下: 限流算法对比.网关限流实践总结(https://segmentfault.com/a/1190000020745218) 高并发下常见的限流算法(https://www.jians ...