当前位置:网站首页>Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
2022-07-05 03:49:00 【No envy】
Successfully solved ( python3+sqlalchemy+pymysql Of pandas read_sql() Methods from MySQL Error in reading data in query )AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
List of articles
Error code
My code :
import pandas
import sqlalchemy
engine = sqlalchemy.create_engine('mssql+pymssql:// user name : password @ Address : Port number / Table name ')
sql = "select max(rid) as maxrid FROM student "
df = pandas.read_sql(sql=sql, con=engine)
print(df)
Error message :
return self.connectable.execution_options().execute(*args, **kwargs)
AttributeError: 'Engine' object has no attribute 'execution_options'
Error reason
Translation of error reporting content :
AttributeError:“ engine ” Object has no properties “execution\u options”
resolvent
Pass on “ Connect ” Variables, not “ engine ”
import pandas
import sqlalchemy
engine = sqlalchemy.create_engine('mssql+pymssql:// user name : password @ Address : Port number / Table name ')
sql = "select max(rid) as maxrid FROM student "
connection = engine.connect()
df = pandas.read_sql(sql=sql, con=connection)
print(df)
The successful running :
maxrid
0 15159049
边栏推荐
- Smart pointer shared_ PTR and weak_ Difference of PTR
- Binary heap implementation (priority queue implementation)
- [wp][入门]刷弱类型题目
- ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
- C file in keil cannot be compiled
- ABP vNext microservice architecture detailed tutorial - distributed permission framework (Part 1)
- Clickhouse同步mysql(基于物化引擎)
- Clickhouse物化视图
- Redis source code analysis: redis cluster
- SQL performance optimization skills
猜你喜欢
[wp][入门]刷弱类型题目
The latest blind box mall, which has been repaired very popular these days, has complete open source operation source code
About MySQL database connection exceptions
UI自动化测试从此告别手动下载浏览器驱动
Deep learning - LSTM Foundation
[untitled]
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
grandMA2 onPC 3.1.2.5的DMX参数摸索
[luat-air105] 4.1 file system FS
程序员的视力怎么样? | 每日趣闻
随机推荐
Analysis of glibc strlen implementation mode
In MySQL Association query, the foreign key is null. What if the data cannot be found?
Subversive cognition: what does SRE do?
Kubernetes - identity and authority authentication
Difference between MotionEvent. getRawX and MotionEvent. getX
【做题打卡】集成每日5题分享(第三期)
問下,這個ADB mysql支持sqlserver嗎?
企业级:Spire.Office for .NET:Platinum|7.7.x
Excuse me, my request is a condition update, but it is blocked in the buffer. In this case, can I only flush the cache every time?
Timing manager based on C #
[summary of two registration methods]
speed or tempo in classical music
ICSI213/IECE213 Data Structures
Redis source code analysis: redis cluster
IronXL for .NET 2022.6
[luat-air105] 4.1 file system FS
花了2晚,拿到了吴恩达@斯坦福大学的机器学习课程证书
[groovy] string (string type variable definition | character type variable definition)
NPM introduction link symbolic link
New interesting test applet source code_ Test available