Files
NewStock/main/data/daily_data.py
2025-04-28 11:02:52 +08:00

12 lines
316 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import tushare as ts
ts.set_token('3a0741c702ee7e5e5f2bf1f0846bafaafe4e320833240b2a7e4a685f')
pro = ts.pro_api()
import pandas as pd
import time
# 读取本地保存的股票列表 CSV 文件(假设文件名为 stocks_data.csv
df = ts.pro_bar(ts_code='000001.SZ', adj='hfq', start_date='20180101')
print(df)