Skip to content

_ensure_numeric does not check for complex numbers #4902

Closed
@alefnula

Description

@alefnula

_ensure_numeric from pandas.core.nanops does not include a check for complex numbers, just converts them to floats.

Relevant StackOverflow question that found the bug: python pandas complex number

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDtype ConversionsUnexpected or buggy dtype conversionsNumeric OperationsArithmetic, Comparison, and Logical operations

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions