Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jorisvandenbossche opened this issue Dec 16, 2018 · 2 comments
Labels
Milestone

Comments

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Dec 16, 2018

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!)

@jorisvandenbossche jorisvandenbossche changed the title DOC/API DOC/API: PeriodIndex sub/add with Integers: update docs or undo deprecation Dec 16, 2018
@jorisvandenbossche jorisvandenbossche added this to the 0.24.0 milestone Dec 16, 2018
@jbrockmendel
Copy link
Member

I think we should maybe also reconsider the deprecation

I'm open to this. The part I care about is the TS/TD/DTI/TDI

@aa1371
Copy link
Contributor

aa1371 commented Dec 16, 2018

+1 for reconsidering the deprecation for Periods.

The behavior is unambiguous, simple and useful. Anecdotally speaking it’s used heavily at my organization, and is one of the reasons that people prefer working with periods.

That said I still think that the new behavior of period1 - period2 returning an offset object is good, and wouldn’t want to see that change.

TomAugspurger added a commit to TomAugspurger/pandas that referenced this issue Dec 19, 2018
TomAugspurger added a commit to TomAugspurger/pandas that referenced this issue Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants