import pandas_datareader.data as web
import datetime as dt
import fix_yahoo_finance as yf
yf.pdr_override()
start=dt.datetime(2010,1,1)
end=dt.datetime(2019,3,10)
df_2330 = web.DataReader('2330.TW', 'yahoo', start, end)
df_2330.to_csv('file.csv')
df=pd.read_csv('file.csv')
print(df.head())
不錯的文章:
Python新手教學(1)用爬蟲爬全球股價
https://www.finlab.tw/%E7%94%A8%E7%88%AC%E8%9F%B2%E7%88%AC%E5%85%A8%E4%B8%96%E7%95%8C%E8%82%A1%E5%83%B9/
https://medium.com/datainpoint/%E5%BE%9E-pandas-%E9%96%8B%E5%A7%8B-python-%E8%88%87%E8%B3%87%E6%96%99%E7%A7%91%E5%AD%B8%E4%B9%8B%E6%97%85-8dee36796d4a
沒有留言:
張貼留言