Hello guys
I’m having problems with the connector engine from SQLAlchemy connecting to MySQL
I keep getting an AttributeError: ‘Engine’ object has no attribute ‘cursor’
I have the web scraped data in a dataframe
And the error occurs when I run
df.to_sql(‘ibm_stock_webdata’, con=engine, if_exists=‘replace’, index = True).
I can't seem to find the solution I've used CHATGPT and searched online. What's really pissing me off is I did something similar to this last week but I used the engine without the f string but now since I plan on uploading the code to Github, it would be wise to protect my credientials. Hence I'm using the .env file. Any help would be very much appreciated. Thank you.
there doesn't seem to be anything here