float(\'nan\') results in Nan (not a number). But how do I check for it? Should be very easy, but I cannot find it.
float(\'nan\')
For nan of type float
>>> import pandas as pd >>> value = float(nan) >>> type(value) >>> >>> pd.isnull(value) True >>> >>> value = 'nan' >>> type(value) >>> >>> pd.isnull(value) False