赞
踩
from WindPy import w
import pandas as pd
w.start()
wdata = w.wset("sectorconstituent","date=2017-05-08;sectorid=a001010100000000")
df = pd.DataFrame()
df['code'] = wdata.Data[1]
df['sec_name'] = wdata.Data[2]
df.to_csv('allstocks.csv',index=False)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。