Going by the documentation for numpy.isnan, ufunc docs and numpy.can_cast; the issue that you're currently facing is owing to the fact that np.isnan would not respond favorably for any datatype other than "int" & "float". I suggest you make use of pd.isna 。