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

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

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

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