Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sqlite to csv statement

import pandas as pd

conn = sqlite3.connect(db_file, isolation_level=None,
                       detect_types=sqlite3.PARSE_COLNAMES)
db_df = pd.read_sql_query("SELECT * FROM table", conn)
db_df.to_csv('database.csv', index=False)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sqlite #csv #statement
ADD COMMENT
Topic
Name
3+8 =