import math
mylist = [0 if math.isnan(x) else x for x in mylist]
Python 列表中的NAN替换为0
最新推荐文章于 2024-08-19 17:29:33 发布
import math
mylist = [0 if math.isnan(x) else x for x in mylist]