Skip to content

Series/DataFrame.rank() doesn't handle np.inf properly #6945

Closed
@nspies

Description

@nspies

The rank() function converts np.nan to np.inf or -np.inf, and therefore can't properly rank existing np.inf. See here: #6886 (comment).

Test for this issue here: https://github.com/pydata/pandas/blob/master/pandas/tests/test_series.py#L4071

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNumeric OperationsArithmetic, Comparison, and Logical operations

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions