CoolWay = "自然冷却" if str(CoolWay) == 'nan' else str(CoolWay)
fan = self.fan.index(CoolWay) if CoolWay in self.fan else 0
1 np.isnan() 不支持 str 只支持 float
2 所以str() ==
3 index 容易错 所以直接 三步合并为一步
np.isnan() str() if in
标签:index,isnan,CoolWay,fan,str,np From: https://blog.51cto.com/u_16055028/9620978