根据排名判断是否淘汰,并淘汰末尾5%的人员:
bd_num=get_scan_week_fire_data[“排名”].count() #bd总数
bd_fire_num=round(bd_num*0.05,0) #要淘汰的总人数
get_scan_week_fire_data[“是否淘汰”]=get_scan_week_fire_data[“排名”].apply(lambda x:“否” if x<=bd_num-bd_fire_num else “是”) #判断是否淘汰
根据排名判断是否淘汰,并淘汰末尾5%的人员:
bd_num=get_scan_week_fire_data[“排名”].count() #bd总数
bd_fire_num=round(bd_num*0.05,0) #要淘汰的总人数
get_scan_week_fire_data[“是否淘汰”]=get_scan_week_fire_data[“排名”].apply(lambda x:“否” if x<=bd_num-bd_fire_num else “是”) #判断是否淘汰