运行以下代码时出现以下错误:
File "E:\ProgramData\Anaconda3\lib\site-packages\sqlalchemy\sql\visitors.py", line 60, in __init__
super(VisitableType, cls).__init__(clsname, bases, clsdict)
TypeError: super(type, obj): obj must be an instance or subtype of type
代码:
import pandas as pd
import mysql.connector
import sqlalchemy as sl
engine=sl.create_engine('mysql+mysqlconnector://root:xxxx@11.11.11.11:3306/kafka')
df = pd.read_sql('select * from kafka_test limit 10', con=engine)
df.head()