code = str(stock_pool['代码'].values[0])def gp_type_szsh(gp):if gp.find('60',0,3)==0:gp_type='SH'+gpelif gp.find('688',0,4)==0:gp_type='SH'+gpelif gp.find('900',0,4)==0:gp_type='SH'+gpelif gp.find('00',0,3)==0:gp_type='SZ'+gpelif gp.find('300',0,4)==0:gp_type='SZ'+gpelif gp.find('200',0,4)==0:gp_type='SZ'+gpreturn gp_typecode = gp_type_szsh(code)