Skip to content

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

@mlew

Description

@mlew

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions