1 of
nan is not a number of abbreviations, not numbers represent, and NAN and NaN represents the same thing, type float.
np.nan have special properties, i.e. np.nan == np.nan is False, this is not the nature of other variables, can be used to determine whether it is nan.
Also be used np.isnan () function to determine whether or nan.
print (np.nan == np.nan) of = np.nan print (a) print (np.isnan (a)) # False # of # True
删除list中的nan: list = [ i for i in list if i == i]
2 https://blog.csdn.net/jpbirdy/article/details/52333301