Pandas uses the NumPy NaN (np.nan) object to represent a missing value. This is an unusual object, as it is not equal to itself. Even Python's None object evaluates as True when compared to itself:
>>> np.nan == np.nan
False
>>> None == None
True
All other comparisons against np.nan also return False, except not equal to:
>>> np.nan > 5
False
>>> 5 > np.nan
False
>>> np.nan != 5
True