Du skal have en rå databaseforbindelse og ikke en forekomst af Connection
. For at få det ring enten engine.raw_connection()
eller engine.connect().connection
:
from pandas.io import sql
#cnx = engine.connect().connection # option-1
cnx = engine.raw_connection() # option-2
xx = sql.read_frame("SELECT * FROM user", cnx)
cnx.close()