-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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: DatetimeIndex.is_year_start breaks on custom business days frequencies bigger then 1C
#58665
Conversation
doc/source/whatsnew/v3.0.0.rst
Outdated
@@ -419,6 +419,7 @@ Interval | |||
Indexing | |||
^^^^^^^^ | |||
- Bug in :meth:`DataFrame.__getitem__` returning modified columns when called with ``slice`` in Python 3.12 (:issue:`57500`) | |||
- Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` does not raise on Custom business days frequencies bigger then "1C" (:issue:`58664`) |
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.
Could you put this under Datetimelike
?
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.
thanks, updated
pandas/_libs/tslibs/fields.pyx
Outdated
|
||
# YearBegin(), BYearBegin() use month = starting month of year. | ||
# QuarterBegin(), BQuarterBegin() use startingMonth = starting | ||
# month of year. Other offsets use month, startingMonth as ending | ||
# month of year. | ||
|
||
if (freqstr[0:2] in ["MS", "QS", "YS"]) or ( | ||
freqstr[1:3] in ["MS", "QS", "YS"]): | ||
if freq_name.lstrip("B")[0:2] in ["MS", "QS", "YS"]: |
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.
if freq_name.lstrip("B")[0:2] in ["MS", "QS", "YS"]: | |
if freq_name.lstrip("B")[0:2] in ["MS", "QS", "YS"]: |
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.
done
this needs rebasing, as it contains commits from the other PR (and could you move the whatsnew from that one to (other than that, it looks like this identifies + fixes the issue, nice) |
thanks, rebased and moved the whatsnew note from |
Thanks @natmokval |
1C
#58664