Skip to content

BUG: ArrowEA._cast_pointwise_result([Decimal(NaN)]) #62522

@jbrockmendel

Description

@jbrockmendel

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

import pandas as pd
from decimal import Decimal

ser = pd.Series([], dtype="float64[pyarrow]")
arr = ser.array
item = Decimal("NaN")

>>> arr._cast_pointwise_result([item]).dtype
null[pyarrow]

Issue Description

This goes through pa.array([item], from_pandas=True) so may be an upstream issue.

Expected Behavior

Ideally this should give back a decimal dtype.

Installed Versions

Replace this line with the output of pd.show_versions()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arrowpyarrow functionalityBug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions