※ 引述《Gracybaby》之铭言:
~ pip install pandas
## main.py
import pandas as pd
import sqlite3
df = pd.read_csv("my_csv.csv")
# 汇入csv的资料到sqlite my_table
with sqlite3.connect('my_sqlite.db') as conn:
df.to_sql('my_table',con=conn)
# 从数据库读取资料
with sqlite3.connect('my_sqlite.db') as conn:
new_df = pd.read_sql('select * from my_table', con=conn)
# 利用 pandas 内建的plot画图
new_df['my_column'].plot()