Skip to content

BUG: Replacement fails after NA value with PyArrow-backed strings #61948

@rhshadrach

Description

@rhshadrach

This does not occur on the main branch, only 2.3.x. I plan to run a git-bisect later today.

pd.set_option("infer_string", True)
ser = pd.Series(["a", np.nan, "a", "a"])
print(ser.replace({"a": "b"}))
# 0      b
# 1    NaN
# 2      a
# 3      b
# dtype: str

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arrowpyarrow functionalityBugreplacereplace method

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions