Skip to content

Period.start_time returns the same value as Period.end_time #1857

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
mlew opened this issue Sep 7, 2012 · 0 comments
Closed

Period.start_time returns the same value as Period.end_time #1857

mlew opened this issue Sep 7, 2012 · 0 comments
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@mlew
Copy link

mlew commented Sep 7, 2012

If you create a Period object with a non-Day frequency, the start_time property incorrectly returns the end_time value.

ex:

In [1]: from pandas import *

In [2]: w = period_range('2012-8-20', '2012-9-10', freq='W-MON')

In [3]: w[0]
Out[3]: Period('14-Aug-2012/20-Aug-2012', 'W-MON')

In [4]: w[0].start_time
Out[4]: <Timestamp: 2012-08-20 00:00:00>

In [5]: w[0].end_time
Out[5]: <Timestamp: 2012-08-20 00:00:00>

In [6]: w[0].freq
Out[6]: 'W-MON'

The expected behavior would return a <Timestamp: 2012-08-14 00:00:00> object for the Period.start_time property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

No branches or pull requests

2 participants