import sqlite3
import pandas.io.sql as sql
con = sqlite3.connect('database.db')
table = sql.read_frame('select * from some_table', con)
table.to_csv('output.csv')
Sqlite3 / python - Export from sqlite to csv text file does not exceed 20k