-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
update to holiday to help with GH#7070 #7913
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
Conversation
looks reasonable (test failures though) |
The right syntax would be |
Thank you very much. Should I keep a test for defined holidays? |
I don't see any harm in that. |
Thanks for the help on this. |
@rockg, I am still crashing on a python3 build. How did you intend to handle the two observations? |
I will setup a python3 environment to test both going forward. |
Yeah, I had to do the same. So many of my changes in the past needed |
@MichaelWS looks fine, can you add a release note (just to document) |
easy enough, should I put it in v0.15.0.txt? |
yep |
@@ -264,6 +264,8 @@ Enhancements | |||
|
|||
|
|||
- ``PeriodIndex`` supports ``resolution`` as the same as ``DatetimeIndex`` (:issue:`7708`) | |||
-``pandas.tseries.holiday`` has added support for additional holidays and ways to observe holidays. | |||
-``pandas.tseries.holiday.Holiday`` now supports a list of offsets in Python3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this doc-stringed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which one? The list of offsets was a bug that appeared in python3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was just an untested case/bug? put the pr reference in the release note
I meant does the doc string say it should accept a list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was an untested case. It takes a list or if its not a list it creates a list around what is inputted. However, two items never worked in python3.
I will edit the pr later today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok ping when done and green
all green, I added to the init so its clear @jreback , thanks for the help. |
@@ -149,7 +213,7 @@ def _apply_rule(self, dates): | |||
offsets = self.offset | |||
|
|||
for offset in offsets: | |||
dates = map(lambda d: d + offset, dates) | |||
dates = list(map(lambda d: d + offset, dates)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is their a test that validates this now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GoodFriday/Easter tests he added validate that it works.
oh i see, ok then. |
update to holiday to help with GH#7070
thanks for the PR! |
I am working on a financial calendar and wanted to add the following functions to pandas.tseries.holiday in order to properly handle half days.