Skip to content

infer_freq borks on PeriodIndex #5841

Closed
@jseabold

Description

@jseabold

Should PeriodIndex pass through infer_freq and return freqstr or should this be the user's problem? Either is a simple fix. The latter should just have a better error message. Right now

from pandas.tseries.api import infer_freq
from pandas import PeriodIndex

infer_freq(PeriodIndex(start="1/1/1990", periods=20, freq="M"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasPeriodPeriod data type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions