以中通客车为例,tushare 用法记录下
system:OSX 10.11.6
python version:Python 3.5.2 :: Anaconda custom (x86_64)
tushare version:0.5.0
import tushare as ts
import time
print('数据来源版本:'+ts.__version__)
#沪深300指数K线数据
print(ts.get_hist_data('hs300'))
#沪深300指数60分钟K线数据
print(ts.get_hist_data('hs300',ktype='60'))
#复权数据
#中通客车的前复权数据
print(ts.get_h_data('000957'))
#中通客车后复权数据
print(ts.get_h_data('000957',autype='hfq'))
#中通客车不复权数据')
print(ts.get_h_data('000957',autype=None))
#行业分类
print('行业分类:\n',ts.get_industry_classified())
#概念分类
print('概念分类:\n',ts.get_concept_classified())
#地域分类
print('地域分类:\n',ts.get_area_classified())
#创业板分类
pr