ipython-input-12-49cdaf33b2bc>:12: 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. dados.to_sql('clientes', con=engine, if_exists='replace', index=False)
AttributeError Traceback (most recent call last) in <cell line: 12>() 10 11 # Tenta salvar os dados no banco ---> 12 dados.to_sql('clientes', con=engine, if_exists='replace', index=False)
7 frames /usr/local/lib/python3.10/dist-packages/pandas/io/sql.py in execute(self, sql, params) 2670 raise TypeError("Query must be a string unless using sqlalchemy.") 2671 args = [] if params is None else [params] -> 2672 cur = self.con.cursor() 2673 try: 2674 cur.execute(sql, *args)
AttributeError: 'Engine' object has no attribute 'cursor'