在Pandas to_sql中指定架构 [英] Specifying the schema in Pandas to_sql
本文介绍了在Pandas to_sql中指定架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从 to_sql 的源中,我可以看到它已映射到元数据对象meta = MetaData(con, schema=schema)
.但是,我找不到SQLAlchemy文档,该文档告诉我如何为MySQL定义架构
From the source of to_sql, I can see that it gets mapped to an Meta Data object meta = MetaData(con, schema=schema)
. However, I can't find SQLAlchemy docs that tell me how to define the Schema for MySQL
如何指定架构字符串?
推荐答案
DataFrame.to_sql(self, name, con, schema=None, if_exists='fail', index=True, index_label=None, chunksize=None, dtype=None, method=None)
只需使用 schema参数.但是请注意,架构不是odbc驱动程序.
Just use schema parameter. But note that schema is not odbc driver.
这篇关于在Pandas to_sql中指定架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文