LernerPython 博客,作者 Reuven Lern... 笔记

LernerPython 博客,作者 Reuven Lerner:Pandas 中的 np.nan:缺失值为何会破坏比较

Python Pandas 中缺失数据?我们使用 nan("not a number"),它源自 NumPy。np.nan 是一个浮点数,但不是普通的浮点数:np.nan + 10 # nan np.nan * 12345 # nan sum([10, 20, np.nan]) # nan np.nan == 0 # False np.nan == np.nan # False
CdXz5zHNQW_fYf9QH92A2.png