I'm using replit. and in the console, I ran the following command:
pip install sqlalchemy
Then, in the main.py file:
from sqlalchemy import create_engine
engine = create_engine('sqlite:///census_nyc.sqlite')
connection = engine.connect()
print(engine.table_names())
the error I get is as follows:
Traceback (most recent call last):
File "main.py", line 5, in <module>
print(engine.table_names())
AttributeError: 'Engine' object has no attribute 'table_names'
I'm trying to follow datacamp's introduction to relational databases and I've fallen at the first hurdle.
I tried the above code exactly as presented in the training videos but it doesn't work.