-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: DatetimeIndex.is_year_start
and DatetimeIndex.is_quarter_start
always return False on double-digit frequencies
#58549
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
Changes from 7 commits
8c9aaa8
21bd212
9f094d7
670a8db
adaf974
d2fab60
57a834e
d77f248
65e6301
e99a2c6
45a2324
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -579,7 +579,7 @@ cdef class _Timestamp(ABCTimestamp): | |
if freq: | ||
kwds = freq.kwds | ||
month_kw = kwds.get("startingMonth", kwds.get("month", 12)) | ||
freqstr = freq.freqstr | ||
freqstr = to_offset(freq.freqstr).name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does it work to directly do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, it works with |
||
else: | ||
month_kw = 12 | ||
freqstr = None | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,8 +145,12 @@ def f(self): | |
kwds = freq.kwds | ||
month_kw = kwds.get("startingMonth", kwds.get("month", 12)) | ||
|
||
if freq is not None: | ||
freqstr = to_offset(freq.freqstr).name | ||
else: | ||
freqstr = freq | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this needs renaming too? And in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, I agree, here |
||
result = fields.get_start_end_field( | ||
values, field, self.freqstr, month_kw, reso=self._creso | ||
values, field, freqstr, month_kw, reso=self._creso | ||
) | ||
else: | ||
result = fields.get_date_field(values, field, reso=self._creso) | ||
|
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.
this should have been in
Datetimelike
, "indexing" is more like.loc
/.iloc
/ get/setitem stuffbut OK to address this as part of https://github.com/pandas-dev/pandas/pull/58665/files, as that one needs updating anyway
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, I addressed this comment in the PR you suggested