BUG: Bug in mask method when handling pd.NA with Int64Dtype #60794
Labels
Bug
Duplicate Report
Duplicate issue or pull request
NA - MaskedArrays
Related to pd.NA and nullable extension arrays
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
I am encountering an issue with the mask method in pandas when it is used with a Series of type Int64Dtype. Specifically, when trying to mask pd.NA values, they are being replaced, which is not the expected behavior. I expected the pd.NA values to remain unchanged, but they are being incorrectly filled.
Expected Behavior
Series([None, -99, -99, None, 3, 4, None], dtype=Int64Dtype())
Installed Versions
python: 3.11.1
pandas: 2.1.3
The text was updated successfully, but these errors were encountered: