1import sqlite3
2import pandas as pd
3
4dat = sqlite3.connect('data.db')
5query = dat.execute("SELECT * From <TABLENAME>")
6cols = [column[0] for column in query.description]
7results= pd.DataFrame.from_records(data = query.fetchall(), columns = cols)
1import pandas as pd
2import sqlite3
3
4con = sqlite3.connect('/Users/mac/Desktop/Python/Baye_stat/productiondisruption/PCI_meat.sqlite')
5
6df = pd.read_sql(<your query here>, con)
7