read frame with sqlalchemy, mysql and pandas

前端 未结 3 1653
情深已故
情深已故 2020-12-31 14:39

I am trying to connect to a mysql database, works fine with Option 1:

from sqlalchemy import create_engine
engine = create_engine(\'mysql://root:root@localho         


        
3条回答
  •  没有蜡笔的小新
    2020-12-31 15:16

    Use the MySQLdb module to create the connection. There is ongoing progress toward better SQL support, including sqlalchemy, but it's not ready yet.

    If you are comfortable installing the development version of pandas, you might want to keep an eye on that linked issue and switch to using the development version of pandas as soon as it is merged. While pandas' SQL support is usable, there are some bugs around data types, missing values, etc., that are likely to come up if you use Pandas + SQL extensively.

提交回复
热议问题