Skip to content

CustomBusinessMonthBegin offset parameter #14869

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

Closed
LingnanLemon opened this issue Dec 12, 2016 · 4 comments
Closed

CustomBusinessMonthBegin offset parameter #14869

LingnanLemon opened this issue Dec 12, 2016 · 4 comments
Labels
good first issue Needs Tests Unit test(s) needed to prevent regressions
Milestone

Comments

@LingnanLemon
Copy link

Code Sample, a copy-pastable example if possible

from pandas.tseries.offsets import CustomBusinessMonthBegin
 
my_offset= CustomBusinessMonthBegin(offset=timedelta(days=5))

Problem description

when creating the offset instance with specific day offset, shows 'offset' is an invalid keyword.

Expected Output

Trying to use the CustomBusinessMonthBegin together with my customized calender and a day offset to get the N_th business day of a certain calender.
Return value should be a caloffset instance.
MonthBegin to get the first business day works well. What if I want to get the second/third/...n_th business day?

Output of pd.show_versions()

0.18.0

# Paste the output here pd.show_versions() here
@jbrockmendel jbrockmendel added the Frequency DateOffsets label Jul 30, 2018
@UltaLior
Copy link

UltaLior commented Mar 2, 2019

Isnt this a bug?

@mroeschke
Copy link
Member

This looks fixed on master. I guess it could use a test

In [19]: from datetime import timedelta

In [20]: from pandas.tseries.offsets import CustomBusinessMonthBegin
    ...:
    ...: my_offset= CustomBusinessMonthBegin(offset=timedelta(days=5))

In [21]: my_offset
Out[21]: <CustomBusinessMonthBegin: offset=datetime.timedelta(days=5)>

@mroeschke mroeschke added good first issue Needs Tests Unit test(s) needed to prevent regressions and removed Frequency DateOffsets labels Jun 28, 2020
@jackzyliu
Copy link
Contributor

First time contributing here. Mind if I take this one?

@mroeschke
Copy link
Member

Closed by #41488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Needs Tests Unit test(s) needed to prevent regressions
Projects
None yet
Development

No branches or pull requests

6 participants