API: ExtensionArray.isin
treatment of missing values
#42545
Labels
API - Consistency
Internal Consistency of API/Behavior
Duplicate Report
Duplicate issue or pull request
ExtensionArray
Extending pandas with custom dtypes or arrays.
isin
isin method
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
The current behavior singles out
pd.NA
:StringArray.isin
also follows this behavior, so it is notMaskedArray
specific.There was discussion about this being problematic since
_from_sequence
will treat other missing values just the same aspd.NA
(#42473 (comment)). In that case, the output in the second case should also beTrue
.As a final option, both outputs could be
pd.NA
. In #38379 there was discussion of propagatingpd.NA
instead ofTrue/False
depending on the presence of missing values in thevalues
argument. A nice description of that debate is here #38379 (comment).The text was updated successfully, but these errors were encountered: