介绍:
昨天查看博客《读取CSV然后导入到Sqlite3中》发现作者没有说明
df.to_sql('some_table', conn, if_exists='append', index=False)
中的相关参数
具体内容
'some_table'
:是表名
conn
:是连接
if_exists
:表如果存在怎么处理
append
:追加replace
:删除原表,建立新表再添加fail
:什么都不干
index=False
:不插入索引index
昨天查看博客《读取CSV然后导入到Sqlite3中》发现作者没有说明
df.to_sql('some_table', conn, if_exists='append', index=False)
中的相关参数
'some_table'
:是表名
conn
:是连接
if_exists
:表如果存在怎么处理
append
:追加replace
:删除原表,建立新表再添加fail
:什么都不干index=False
:不插入索引index