You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
utils/importStocksData.py

8 lines
233 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import pandas as pd
# 读取Excel文件
excel_file = 'data.xlsx'
sheet_name = 'Sheet1' # 要读取的工作表名称
df = pd.read_excel(excel_file, sheet_name=sheet_name)
# 连接到SQLite数据库如果不存在则会创建