Skip to content

period_range() bug? #7817

Closed
Closed
@ifmihai

Description

@ifmihai

I did:

63 In : df = P.DataFrame(index=P.period_range('2000-1-1 10:20', '2005-1-1 12:00'))

64 In : df.index[0]
64 Out: Period('2000-01-01', 'D')

65 In : df.index[0].hour
65 Out: 0

it should have been 10, right?

why does period_range() loses time information?

I was recommended to use periods and period_range() because of pandas Timestamp limitation (nanoseconds time units)

now I'm stuck, because I need datetimes outside Timestamp range

ps.
would it be too drastic to change time units from nanoseconds to microseconds in Timestamp? so that we would be happier? :P
see also #7307

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions