8000 ENH: Shall we let pd.NA * 0 equals to zero? · Issue #47117 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content
ENH: Shall we let pd.NA * 0 equals to zero? #47117
@tushushu

Description

@tushushu

Is your feature request related to a problem?

I found that:

pd.NA ** 0 # The result is 1
pd.NA * 0 # The result is pd.NA

Describe the solution you'd like

Personally, I think the pow and mul method shoulds be consistent. The results should be both NA or both numbers.
Solution 1:

pd.NA ** 0 # The result is pd.NA
pd.NA * 0 # The result is pd.NA

Solution 2:

pd.NA ** 0 # The result is 1
pd.NA * 0 # The result is 0

PS: I assume the pd.NA is not infinite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0