Skip to content

Power to the NA with Int64 series gives NA #22022

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

Corner-case, but the integer NA type does seem to behave differently when it comes to rpow:

In [57]: pd.Series([1, 1, 1]) ** pd.Series([1, np.nan, 3])
Out[57]: 
0    1.0
1    1.0
2    1.0
dtype: float64

In [58]: pd.Series([1, 1, 1]) ** pd.Series([1, np.nan, 3], dtype='Int64')
Out[58]: 
0      1
1    NaN
2      1
dtype: Int64

In [63]: 1 ** np.nan
Out[63]: 1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugExtensionArrayExtending pandas with custom dtypes or arrays.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions