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)