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

c++ - CPP, 'X' button listener -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -

shared memory - gstreamer shmsrc and shmsink with h264 data -