问题描述 使用pandas的read_sql方法连接天软时出现异常提示:UserWarning: pandas only support SQLAlchemy connectable(engine/connection) ordatabase string URI or sqlite3 DBAPI2 connectionother DBAPI2 objects are not tested, please consider using SQLAlchemy
warnings.warn(
参考范例 python代码:
from sqlalchemy import create_engine
import pandas as pd
import pyodbc
conn=pyodbc.connect("dsn=tsodbc")
sql='''
return rand(3,3);
'''
data= pd.read_sql(sql,conn)
print(data)