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

BUG: LWOM-SUN (LastWeekOfMonth) should directly work / doc examples of use #7985

Closed
jreback opened this issue Aug 11, 2014 · 3 comments
Closed
Labels

Comments

@jreback
Copy link
Contributor

jreback commented Aug 11, 2014

http://pandas.pydata.org/pandas-docs/stable/timeseries.html#dateoffset-objects
is their

Isn't 'LWOM-SUN' supposed to work for the offset?

it raises ValueError

In [5]: date_range('20130101',periods=5,freq=pd.offsets.LastWeekOfMonth(weekday=pd.offsets.WeekDay.SUN))
Out[5]: 
<class 'pandas.tseries.index.DatetimeIndex'>
[2013-01-27, ..., 2013-05-26]
Length: 5, Freq: LWOM-SUN, Timezone: None

In [6]: date_range('20130101',periods=5,freq=pd.offsets.LastWeekOfMonth(weekday=pd.offsets.WeekDay.SUN)).tolist()
Out[6]: 
[Timestamp('2013-01-27 00:00:00', offset='LWOM-SUN'),
 Timestamp('2013-02-24 00:00:00', offset='LWOM-SUN'),
 Timestamp('2013-03-31 00:00:00', offset='LWOM-SUN'),
 Timestamp('2013-04-28 00:00:00', offset='LWOM-SUN'),
 Timestamp('2013-05-26 00:00:00', offset='LWOM-SUN')]
@jreback jreback added this to the 0.15.0 milestone Aug 11, 2014
@jreback
Copy link
Contributor Author

jreback commented Aug 11, 2014

cc @cancan101

@jreback jreback changed the title DOC: document LastWeekOfMonth in offsets table (and usage example) BUG: LWOM-SUN (LastWeekOfMonth) should directly work / doc examples of use Aug 11, 2014
@cancan101
Copy link
Contributor

@mroeschke
Copy link
Member

Hmm looks like WeekDay is an old API that is no longer supported. Not sure if this issue is actionable anymore. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants