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

Support for bimonthly/weekly timerules #1543

Closed
JWCornV opened this Issue Jun 27, 2012 · 4 comments

Comments

Projects
None yet
5 participants
@JWCornV

JWCornV commented Jun 27, 2012

Any change of getting bi-monthly (1st and 15th) of the month, or bi-weekly (every two weeks) supported?

I could probably do this.

@wesm

This comment has been minimized.

Show comment
Hide comment
@wesm

wesm Jun 27, 2012

Member

I'd be happy to accept a patch for bi-monthly. Bi-weekly is already supported but not in "anchored form":

In [2]: date_range('6/26/2012', periods=10, freq='2W-TUE')
Out[2]: 
<class 'pandas.tseries.index.DatetimeIndex'>
[2012-06-26 00:00:00, ..., 2012-10-30 00:00:00]
Length: 10, Freq: 2W-TUE, Timezone: None

In [3]: list(date_range('6/26/2012', periods=10, freq='2W-TUE'))
Out[3]: 
[<Timestamp: 2012-06-26 00:00:00>,
 <Timestamp: 2012-07-10 00:00:00>,
 <Timestamp: 2012-07-24 00:00:00>,
 <Timestamp: 2012-08-07 00:00:00>,
 <Timestamp: 2012-08-21 00:00:00>,
 <Timestamp: 2012-09-04 00:00:00>,
 <Timestamp: 2012-09-18 00:00:00>,
 <Timestamp: 2012-10-02 00:00:00>,
 <Timestamp: 2012-10-16 00:00:00>,
 <Timestamp: 2012-10-30 00:00:00>]
Member

wesm commented Jun 27, 2012

I'd be happy to accept a patch for bi-monthly. Bi-weekly is already supported but not in "anchored form":

In [2]: date_range('6/26/2012', periods=10, freq='2W-TUE')
Out[2]: 
<class 'pandas.tseries.index.DatetimeIndex'>
[2012-06-26 00:00:00, ..., 2012-10-30 00:00:00]
Length: 10, Freq: 2W-TUE, Timezone: None

In [3]: list(date_range('6/26/2012', periods=10, freq='2W-TUE'))
Out[3]: 
[<Timestamp: 2012-06-26 00:00:00>,
 <Timestamp: 2012-07-10 00:00:00>,
 <Timestamp: 2012-07-24 00:00:00>,
 <Timestamp: 2012-08-07 00:00:00>,
 <Timestamp: 2012-08-21 00:00:00>,
 <Timestamp: 2012-09-04 00:00:00>,
 <Timestamp: 2012-09-18 00:00:00>,
 <Timestamp: 2012-10-02 00:00:00>,
 <Timestamp: 2012-10-16 00:00:00>,
 <Timestamp: 2012-10-30 00:00:00>]

@jreback jreback modified the milestones: 0.15.0, 0.14.0 Feb 18, 2014

@jreback jreback modified the milestones: 0.16.0, 0.17.0 Jan 26, 2015

@dbinetti

This comment has been minimized.

Show comment
Hide comment
@dbinetti

dbinetti Aug 21, 2015

(Edited) The Bi-unit form (multiplied by two) is already supported for any DateOffset object. What you asking for is the Semi-unit form (divided by two), which (AFAIK) is not supported. Having a semi-* form would be useful for many business applications.

dbinetti commented Aug 21, 2015

(Edited) The Bi-unit form (multiplied by two) is already supported for any DateOffset object. What you asking for is the Semi-unit form (divided by two), which (AFAIK) is not supported. Having a semi-* form would be useful for many business applications.

@adrienemery

This comment has been minimized.

Show comment
Hide comment
@adrienemery

adrienemery May 18, 2016

Contributor

Any word on if this will be included in an upcoming release? If not I can put together a patch for Semi-Monthly.

I propose:

SM for Semi-Monthly Month End (15th and last day of month)
SMS for Semi-Monthly Month Start (1st and 15th)

Contributor

adrienemery commented May 18, 2016

Any word on if this will be included in an upcoming release? If not I can put together a patch for Semi-Monthly.

I propose:

SM for Semi-Monthly Month End (15th and last day of month)
SMS for Semi-Monthly Month Start (1st and 15th)

@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback May 18, 2016

Contributor

This would be a straightforward extension. patches are welcome.

Contributor

jreback commented May 18, 2016

This would be a straightforward extension. patches are welcome.

@jreback jreback modified the milestones: 0.18.2, Next Major Release May 29, 2016

adrienemery added a commit to adrienemery/pandas that referenced this issue Jun 14, 2016

@jreback jreback closed this in bd66592 Jun 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment