获取行业哑变量
from jqdatasdk import *
import pandas as pd
#以上证50为例
stocks = get_index_stocks('000016.XSHG')
df2 = pd.DataFrame(list(map(lambda x:get_industry(x,strfdatenow)[x]['sw_l1']['industry_code'],stocks)),
index=stocks,columns=['ind'])
df2 = pd.get_dummies(df2)
print(df2)