import sqlite3 import pandas as pd db = sqlite3.connect("response.db") df = pd.read_sql('SELECT * from responses', db) print(df) # def importdb(db): # conn = sqlite3.connect(db) # c = conn.cursor() # c.execute("SELECT name FROM sqlite_master WHERE type='table';") # for table in c.fetchall() # yield list(c.execute('SELECT * from ?;', (table[0],)))