『壹』 python怎麼抓新浪百度股票數據 datareader
應該都是可以獲取的,一般獲取數據有兩個方法,get和post,在源碼能夠顯示的使用的是get,而post一般是用非同步載入的形式進行展現的。
『貳』 python,pandas_datareader無法使用的問題
先確定下你的python 版本,目前pandas-datareader支持的python版本如下
『叄』 python讀取財經數據
提取日期數據基本語法
from WindPy import w
w.start()
當出現.ErrorCode==-103說明沒連接上,要start一下
w.wsd(security, fields, startDate = None, endDate= None , options = None)
opion 可選(period, 日期類型, 貨幣類型,前後復權)
提取財務數據基本語法
w.wss(security, fields, options = None)
提取板塊日序列基本語法
w.wses(sectorCode, fields, startDate = None, endDate = None, options = None)
提取板塊日截面數據基本語法
w.wsee(sectorCode, fields, options=None)
提取宏觀數據基本語法
w.edb(codes, startDate =None, endDate =None, options=None)
1.日期序列基本語法
ts.get_hist_data(stock,start,end)
注意:1.stock不能是集合,只能單個股票 2.需要帶上.sz或.sh 3.沒有field,只能取出數據後再切除.
2.pro用法
pro.daily(code, start, end, fields)
tushare引用語句
弊端也很明顯,一方面不能stock集合輸入,一次只能調取一個股票對應數據,另一方面tushare雖是免費試用,但有許可權限制。
基本語法
wb.get_data_yahoo(code, start, end)
wb.DataReader(code, 'yahoo', start, end)
沒法添加fields, 雖能集合適用,但出來的索引挺奇怪的
推薦使用定義函數或用for循環批量獲取數據
總體感覺wind api最舒服,但需要賬號,mac也不能直接調用wind api。還是推薦tushare的pro用法。
小白學習中,請指教=v=
『肆』 python可以用於地理信息系統的開發嗎
是可以的,現在用的人也比較多
『伍』 python,pandas怎麼提取索引的值
a={'一':["A","B","C"],'二':["D","E","F"]}
b=list(a.values())
print(b[1])#['D','E','F']