Why can't I detect the np.nan value in data using np.isnan() in the list comprehension below? Does the list comprehension transform the type of values in some way?
data = pd.DataFrame({'col':['a', 'b', np.nan]})
[print('NaN') if np.isnan(i) else print('Not NaN') for i in data.col]