A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/9425 below:

'infer_freq' can return timerule (WOM-5MON) that 'to_offset' does not support · Issue #9425 · pandas-dev/pandas · GitHub

import pandas as pd
index = [pd.Timestamp('2014-03-31 00:00:00'),
         pd.Timestamp('2014-06-30 00:00:00'),
         pd.Timestamp('2015-03-30 00:00:00'),
         pd.Timestamp('2015-06-29 00:00:00')]
freq = pd.infer_freq(index)  # WOM-5MON
pd.datetools.to_offset(freq)  # ValueError: Could not evaluate WOM-5MON

Instead of supporting WOM-5###, I think we can easily modify _get_wom_rule() to return None for this set of dates so it doesn't get inferred. Agree?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4