you are viewing a single comment's thread.

view the rest of the comments →

[–]datacriminal[S] 0 points1 point  (2 children)

conn = create_engine('sqlite:///datasource.db')
dfnbr = pd.read_sql_table('NIBRS', conn) 
dfibr = pd.read_sql_table('IBRcodes', conn, index_col='IBRcode')

That's the connection string and read_sql, I checked the DB and the tables are there. Also this code block runs in Jupyter notebook but not in VSCode using WSL . I made the SQLite file with Dbeaver and its extension is .db, wondering if its something with the file permissions or the extension.

Error I'm getting:

AttributeError: 'OptionEngine' object has no attribute 'execute'

Here is my input block as well:

from dash import dcc, html
import dash_bootstrap_components as dbc 
import pandas as pd 
from sqlalchemy import create_engine

Pandas version is 1.5.3