pandas-错误合集

发布时间 2023-11-04 00:13:43作者: 数据的反抗精神疗法

1. 错误

C:\Users\Gao\AppData\Local\Temp\ipykernel_30488\4043406211.py:9: UserWarning: pandas only supports SQLAlchemy connectable (engine/connection) or database string URI or sqlite3 DBAPI2 connection. Other DBAPI2 objects are not tested. Please consider using SQLAlchemy.
  mysql_page = pd.read_sql(sql="select * from dept", con=conn)

参考:

  1. https://www.cnblogs.com/hziwei/p/13576327.html
  2. http://t.csdnimg.cn/dKBdv

2. KeyError: "['A'] not found in axis"
描述:在使用df.drop('A')时,报错:KeyError: "['A'] not found in axis"

参考:http://t.csdnimg.cn/iTry0