# 导入tushare import tushare as ts# 初始化pro接口 pro = ts.pro_api('填写你自己的key')# 拉取数据 df = pro.daily(**{"ts_code": "000001.SZ","trade_date": "","start_date": 20220101,"end_date": 20220301,"offset": "","limit": "" }, fields=["ts_code","trade_date","open","high","low","close","pre_close","change","pct_chg","vol","amount" ]) print(df) # 导入tushare import tushare as ts# 初始化pro接口 pro = ts.pro_api('')data = pro.query('stock_basic', exchange='', list_status='L', fields='ts_code,symbol,name,area,industry,list_date')print(data) # print(data['symbol'] + ':' + data['ts_code'] + ':' + data['name']) # print(len(data)) # 需要减一 print(type(data)) print(type(data['ts_code'])) print(data['ts_code'][0]) print(data['ts_code'][1]) print(data['name'][0]) print(data['name'][1]) print('*********************')