Skip to content

No WeekOfMonth Defined for Weekends #5115

Closed
@cancan101

Description

@cancan101
In [35]: pd.date_range("2013-1-1", periods=4,freq='WOM-1SAT')
----> 1 pd.date_range("2013-1-1", periods=4,freq='WOM-1SAT')

/home/alex/git/pandas/pandas/tseries/index.pyc in date_range(start, end, periods, freq, tz, normalize, name)
   1724     """
   1725     return DatetimeIndex(start=start, end=end, periods=periods,
-> 1726                          freq=freq, tz=tz, normalize=normalize, name=name)
   1727 
   1728 

/home/alex/git/pandas/pandas/tseries/index.pyc in __new__(cls, data, freq, start, end, periods, copy, name, tz, verify_integrity, normalize, **kwds)
    158             # if a passed freq is None, don't infer automatically
    159             if freq != 'infer':
--> 160                 freq = to_offset(freq)
    161             else:
    162                 freq_infer = True

/home/alex/git/pandas/pandas/tseries/frequencies.pyc in to_offset(freqstr)
    463                     delta = delta + offset
    464         except Exception:
--> 465             raise ValueError("Could not evaluate %s" % freqstr)
    466 
    467     if delta is None:

ValueError: Could not evaluate WOM-1SAT

I will fix as part of #5004

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions