AI engineering glossary · NumPy pandas visualization
What is naN?
NaN (also called Not a Number): A special floating-point value meaning Not a Number, used for undefined results such as 0/0 or for missing data. It is contagious: arithmetic with it gives NaN, and it is not equal to itself, so it must be tested with np.isnan rather than ==.
NaN: an example
np.mean([1, 2, np.nan]) returns nan, whereas np.nanmean ignores the missing entry and returns 1.5.
Related terms
- Missing data
- fillna
- Floating point
- Masked array
More NumPy pandas visualization terms
Where you learn it
NaN is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.