Skip to content
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

ENH:Resume the 'loffset' arguments in Grouper and resample #40367

Closed
leohazy opened this issue Mar 11, 2021 · 1 comment
Closed

ENH:Resume the 'loffset' arguments in Grouper and resample #40367

leohazy opened this issue Mar 11, 2021 · 1 comment
Labels
Enhancement Needs Discussion Requires discussion from core team before further action Resample resample method

Comments

@leohazy
Copy link

leohazy commented Mar 11, 2021

i noticed that the 'loffset' arguments in Grouper and resample is deprecated since v1.1.0 #31809.The new arguments 'origin' and 'offset' are use to specify the start of bin.The 'loffset' is use for ajusting the result labels, which is a useful Feature.without the 'loffset',we need to add the offset to the index after group/resample,it's a little boring。

from pandas.tseries.frequencies import to_offset
loffset = '19min'
ts_out = ts.resample('17min').sum()
ts_out.index = ts_out.index + to_offset(loffset)

To avoid the confusion,you can change 'loffset' to 'label_offset' .

@leohazy leohazy added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 11, 2021
@mroeschke mroeschke added Needs Discussion Requires discussion from core team before further action Resample resample method and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 19, 2021
@mroeschke
Copy link
Member

Thanks for the suggestion but since this deprecation has been enforced and there hasn't been much interest to address going to close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Discussion Requires discussion from core team before further action Resample resample method
Projects
None yet
Development

No branches or pull requests

2 participants