-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DEPR: deprecate strings T, S, L, U, and N in offsets frequencies, resolution abbreviations, _attrname_to_abbrevs #54061
Conversation
@jbrockmendel, could you please take a look at my pr? I started deprecating codes First, If we deprecate And another question: in class Minute(Tick) and class Milli(Tick) we use |
Yes and yes. |
…revs and fix tests
…brev_to_attrnames
…ffset_to_period_map and fix tests
…brev_to_attrnames
Hi @jbrockmendel. I have a question. Should we deprecate My qustion is related to PR: DEPR offsets: rename ‘M’ to ‘ME’ #52064. I started deprecating for offsets
|
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.
Nice, getting close! Looks like there's just some doctest failures, and some asv ones
Also this is in the docs build
RuntimeError: Non Expected exception in /home/runner/work/pandas/pandas/doc/source/user_guide/scale.rst
line None
so there may be something in that file too
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.
Nice!
Have left some comments (which maybe you were going to address anyway 🙈 either way, thought I'd leave them in case)
@MarcoGorelli, @jbrockmendel, could you please take a look at my changes? I corrected the pr as you suggested. Seems like failures in ci aren't related to my changes. |
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.
generally looks good, just got some minor comments
I think we should do hours as well, but please keep that to a separate PR
@@ -905,11 +905,11 @@ into ``freq`` keyword arguments. The available date offsets and associated frequ | |||
:class:`~pandas.tseries.offsets.CustomBusinessHour`, ``'CBH'``, "custom business hour" | |||
:class:`~pandas.tseries.offsets.Day`, ``'D'``, "one absolute day" | |||
:class:`~pandas.tseries.offsets.Hour`, ``'H'``, "one hour" |
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 doesn't need changing in this PR (can be done as a follow-up, there's plenty of time until pandas 2.2), but if we're doing these renamings, then 'H' should probably be renamed too (and CBH, and BH)
I'd stop there - then there a simple rule: anything sub-daily is lowercase, anything daily or higher is upper-case
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.
Thank you for the comments. I agree, it would be better to rename 'H', 'CBH', and 'BH' too, I'll do it in a separate PR. I like the idea to keep anything sub-daily lowercase, and daily or higher upper-case.
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.
Thank you for helping me with this PR. |
Right, let's do this, thanks @natmokval |
…olution abbreviations, _attrname_to_abbrevs (pandas-dev#54061)
xref #52536
deprecated codes
'T'
and'L'
in_attrname_to_abbrevs/_abbrev_to_attrnames
, added a test for FutureWarning.EDIT:
'T', 'L', 'U', 'N'
in favour of'min', 'ms', 'us', 'ns'
.'T', 'L', 'U', 'N'
for time series frequencies in favour of'min', 'ms', 'us', 'ns'
.'T', 'L', 'U', 'N'
for Timedelta.resolution_string in favour of'min', 'ms', 'us', 'ns'
.