获取行业和概念列表
from jqdatasdk import * import json import numpy as np import pandas as pd import os import time def industry_list(code): d1= get_industry(code,date=now) ar1=d1[code] ar2=[] for q in ar1: ar1[q]["industry_type"]=q ar2.append(ar1[q]) df1=pd.DataFrame(ar2) return df1 def concept_list(code): ar1=get_concept(code,date=now) df1=pd.DataFrame(ar1[c1]["jq_concept"]) return df1 now=time.strftime("%Y-%m-%d",time.localtime(int(time.time()))) auth('user', 'psw') b1 = is_auth() if b1: code=["601398","000333"] a1=normalize_code(code) c1=a1[1] df1=industry_list(c1) df2=concept_list(c1) print(df1) print(df2) logout()