Enter into my sqlite databse and show all tables in it:
sqlite3 mytest.db
.tables
All tables in mytest.db can list,now wrap the .tables in
from sqlalchemy import create_engine
import pandas as pd
engine = create_engine('sqlite:///option.sqilte')
df = pd.read_sql('.tables',engine)
another try:
import pandas as pd
import sqlite3
con = sqlite3.connect("option.sqlite")
df = pd.read_sql_query(".tables", con)
Both of them can show tables ,how to fix them?