Skip to content

Cannot create DatetimeIndex using Period #6780

Closed
@jseabold

Description

@jseabold

This doesn't work. Looks like start and end should try a bit harder to convert to timestamp?

from datetime import datetime
pd.DatetimeIndex(start=pd.Period('1990q1'), end=datetime(1992, 12, 31), freq='Q')

This does.

pd.DatetimeIndex(start=pd.Period('1990q1').to_timestamp(), end=datetime(1992, 12, 31), freq='Q')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasFrequencyDateOffsetsPeriodPeriod data type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions