Why does ~pd.isnull() return -2?
It's because you used an arithmetic, bitwie negation operator instead of a logical negation.
I was doing some quick tests for handling missing values and came across this weird behavior. When looking at ~pd.isnull(np.nan), I expect it to return False, but instead it returns -2. Why is this?