Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: fix _infer_freq for pandas .14+ compat #1872

Merged
merged 1 commit into from Aug 6, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions statsmodels/tsa/base/datetools.py
Expand Up @@ -281,8 +281,9 @@ def _add_datetimes(dates):
return reduce(lambda x, y: y+x, dates)

def _infer_freq(dates):
if hasattr(dates, "freqstr"):
return dates.freqstr
maybe_freqstr = getattr(dates, 'freqstr', None)
if maybe_freqstr is not None:
return maybe_freqstr
try:
from pandas.tseries.api import infer_freq
freq = infer_freq(dates)
Expand Down