Skip to content

DEPR: masking fallback in binary operations #52597

Open
@jbrockmendel

Description

@jbrockmendel
ser = pd.Series(['a', np.nan, 'c'], dtype=object)

>>> ser + "b"
0     ab
1    NaN
2     cb
dtype: object

The operation here goes through ops.array_ops where it raises, then falls back to _masked_arith_op where it only operates on non-na entries. This seems mostly motivated by supporting strings-with-nans, but was implemented before StringArray implemented this support (better). Do we still need this fallback behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeprecateFunctionality to remove in pandasMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNumeric OperationsArithmetic, Comparison, and Logical operations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions