Skip to content

DOC/API: PeriodIndex sub/add with Integers: update docs or undo deprecation #24305

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

Creating an issue of my comment on the PR that deprecated PeriodIndex add/sub with integers (#22535):

@jbrockmendel what was actually the rationale of deprecating it for Periods as well?
The issue that is closed by this (#21939, cc @jreback @mroeschke) discusses it for DatetimeIndex/TimedeltaIndex, but I think says to keep it for PeriodIndex for now.

In any case, for PeriodIndex, this was an explicitly documented behaviour (in several places throughout the docs), and the documentation is now no longer up to date (you can check the doc build to see the deprecation warnings being raised).

But instead of updating the docs, I think we should maybe also reconsider the deprecation (given that is was a clearly documented behaviour). Or at least provide a clear alternative way.

(and to be clear: I fully agree with the deprecation for DatetimeIndex / TimedeltaIndex!)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions