DEPR: __invert__ on non-bool dtypes
Author: jbrockmendelCreated Feb 22, 2023Updated Sep 16, 2026
LabelsNumeric OperationsDeprecateNeeds Discussion
ATM we allow `~obj` with any dtype, but the pyarrow dtypes only allow it with boolean dtype. We should be consistent here, either allowing it for all dtypes or for only-bool dtypes. On a call with @mroeschke and @jorisvandenbossche a couple weeks ago we were leaning towards only-bool, though I forget the exact reasoning. Either of you remember?
Source: pandas-dev/pandas