Skip to content

Period.asfreq issue caused(?) by C division rules #19643

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

Closed
jbrockmendel opened this issue Feb 11, 2018 · 2 comments · Fixed by #19650 or #27916
Closed

Period.asfreq issue caused(?) by C division rules #19643

jbrockmendel opened this issue Feb 11, 2018 · 2 comments · Fixed by #19650 or #27916
Labels
Bug Period Period data type
Milestone

Comments

@jbrockmendel
Copy link
Member

This behavior is present both before and after #19608/#19540.

per = pd.Period('0001-01-01', freq='B')
>>> per + 1
Period('0001-01-02', 'B')
>>> per - 1
Period('0001-01-05', 'B')
>>> per - 4
Period('0001-01-02', 'B')
>>> per - 5
Period('0000-12-25', 'B')
@gfyoung gfyoung added Period Period data type Bug labels Feb 11, 2018
@gfyoung
Copy link
Member

gfyoung commented Feb 11, 2018

How odd! PR to patch this is welcome!

@jbrockmendel
Copy link
Member Author

Making a PR for this now, parking a related issue that is going in an xfail for the time being:

per = Period('0001-01-01', freq='B')
>>> per.to_timestamp()
Timestamp('1754-08-30 22:43:41.128654848')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Period Period data type
Projects
None yet
3 participants