Python 使用Pandas读取excel文件后,将数据插入MySQL中。
当有字段的时间为空时,发生报错:"Incorrect datetime value: 'NaT' for column date at row xx”
解决方案
将时间字段设置为字符串类型
重新插入数据即可。
Python 使用Pandas读取excel文件后,将数据插入MySQL中。
当有字段的时间为空时,发生报错:"Incorrect datetime value: 'NaT' for column date at row xx”
解决方案
将时间字段设置为字符串类型
重新插入数据即可。