📜  sqlite 到 csv 语句 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:24.530000             🧑  作者: Mango

代码示例1
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)