BUG: unary operators on IntegerArray return shared mask creating inconsistencies when assigning null and non-null values #39943
Labels
Bug
Copy / view semantics
NA - MaskedArrays
Related to pd.NA and nullable extension arrays
Regression
Functionality that used to work in a prior pandas version
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
shared mask leads to an inconsistency when assigning a non-null value compared to assigning a null value
also for
__invert__
in BaseMaskedArray so will also affect other nullable arraysExpected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here leaving a blank line after the details tag]The text was updated successfully, but these errors were encountered: