tushare库:免费的python财经数据接口

tushare官网以及在线文档http://tushare.org/

安装    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tushare

然后试试看,这个包使用pandas DataFrame数据格式,引用包import tushare as ts

然后ts.get_today_all()可以获取当日所有股票信息

imagets.get_hist_data('600848')可以获取对应股票代码的历史数据

image

对应数据字典在文档中可以查询到

其他还可以看电影票房、新闻等等,很nice的库

posted @ 2019-10-16 11:12  九命猫幺  阅读(810)  评论(0编辑  收藏  举报