Skip to content

DOC: tolerance in Index.reindex can be a Sequence at runtime #62923

@cmp0xff

Description

@cmp0xff

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/dev/reference/api/pandas.Index.reindex.html

Documentation problem

tolerance can be a Sequence, which is not too clear in the docs, saying tolerance: int or float, optional.

In [56]: pd.Index([1, 0]).reindex([0, 1.1], method='nearest', tolerance=[0, .2])
Out[56]: (Index([0.0, 1.1], dtype='float64'), array([1, 0]))

This is found in https://github.com/pandas-dev/pandas-stubs/pull/1459/files#r2478806601.

Suggested fix for documentation

Improve the description and make it consistent.

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