Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Pandas to_sql向db表发送额外的空行_Python_Sqlite_Pandas To Sql - Fatal编程技术网

Python Pandas to_sql向db表发送额外的空行

Python Pandas to_sql向db表发送额外的空行,python,sqlite,pandas-to-sql,Python,Sqlite,Pandas To Sql,我正在将csv文件读入数据框并将其写入sqlite db表,并收到以下警告: UserWarning: The spaces in these column names will not be changed. In pandas versions < 0.14, spaces were converted to underscores. 当我查看数据库时,有915行,最后153行都是空的 我只是在学习python,想不出任何理由。谷歌搜索在sql中添加额外的带有熊猫的行,但没有找到任何

我正在将csv文件读入数据框并将其写入sqlite db表,并收到以下警告:

UserWarning: The spaces in these column names will not be changed. In pandas versions < 0.14, spaces were converted to underscores.
当我查看数据库时,有915行,最后153行都是空的

我只是在学习python,想不出任何理由。谷歌搜索在sql中添加额外的带有熊猫的行,但没有找到任何结果


有什么想法吗?

建议您检查上传文件。如果有以前有数据但未被删除的行,这些行将作为空白上传。打开excel并删除其他行,然后再次尝试上载

print(dfw.shape)