from response_db import ResponseDb import pandas as pd db = ResponseDb() df = pd.DataFrame(list(db.get())) print(df) df.to_csv("responses_new.csv", index=False) import sqlite3 import pandas as pd db = sqlite3.connect("response.db") df = pd.read_sql('SELECT * from responses', db) print(df) df.to_csv("responses_old.csv", index=False)