-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
EnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasFrequencyDateOffsetsDateOffsetsPeriodPeriod data typePeriod data type
Description
xref #8466
Can't it just return the freq
for you instead of raising an error? Helps with duck typing.
[~/]
[1]: pd.version.version
[1]: '0.13.1-434-gdcbbc59'
[2]: pd.tseries.frequencies.infer_freq(pd.PeriodIndex(['2000-01-01'], freq='D'))
Error message
File "/home/skipper/src/pandas-skipper/pandas/tseries/frequencies.py", line 656, in infer_freq
raise TypeError("PeriodIndex given. Check the `freq` attribute "
TypeError: PeriodIndex given. Check the `freq` attribute instead of using infer_freq.
Metadata
Metadata
Assignees
Labels
EnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasFrequencyDateOffsetsDateOffsetsPeriodPeriod data typePeriod data type