Open
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.