I am working on a data set that was imported into a Jupyter notebook from an excel file. The original file had a column with True and False values. When converted into a data frame, these values turned into 0 & 1 of type float64. The column had some missing values, too.
I tried converting them back to boolean type using
.astype('bool')
Weird enough, I found out that the missing data was converted to True.
Why did this happen??!!
I tried avoiding this by selecting only notnull()
values but the type changed to Object not boolean