python - Why is the result of pandas.Series([numpy.nan]).astype("bool") is True? -


i wondering why result of

pandas.series([numpy.nan]).astype("bool")

is true?

probably because np.nan objects truthy:

>>> bool(np.nan) true 

Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -