python连接mysql数据库时最后一行代码发生 1193错误

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
df.to_sql(name='eeshoufang', con=conn, if_exists='append', index=False, index_label=False)#df_out是处理好的数据
运行结果及报错内容

发生异常: OperationalError
(pymysql.err.OperationalError) (1193, "Unknown system variable 'transaction_isolation'")
(Background on this error at: https://sqlalche.me/e/14/e3q8)
File "C:\Users\86177\Desktop\爬虫\58二手房.py", line 42, in
df.to_sql(name='eeshoufang', con=conn, if_exists='append', index=False, index_label=False)#df_out是处理好的数据

我的解答思路和尝试过的方法
我想要达到的结果

MySQL错误代码:1193是未知的系统变量,你每次循环都create_engine连接一下数据库,这个资源开支很大,而且你创建数据表了没有

for ranks,genres,names,renews,estates,fonts,writers,Times in zip(rank,genre,name,renew,estate,font,writer,Time):
data={
'rank':ranks.strip(),
'genre':genres.strip(),
'name':names.strip(),
'renew':renews.strip(),
'estate':estates.strip(),
'font':fonts.strip(),
'writer':writers.strip(),
'Time':Times.strip(),
}
a.append(data)
df=pd.DataFrame(a,columns=['rank','genre','name','renew','estate','font','writer','Time'])
conn = create_engine('mysql+mysqldb://root:123456@localhost:3306/xiaoshuo?charset=utf8')
df.to_sql(name='eeshoufang', con=conn, if_exists='append', index=False, index_label=False)#df_out是处理好的数据

这个是部分代码

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632