Skip to content

Deprecation of loffset parameter to resample() #8175

Answered by fuxb
douglatornell asked this question in Q&A
Discussion options

You must be logged in to vote

I also struggled with understanding this, but finally found #4535 (comment)

So in your case this would be:

from pandas.tseries.frequencies import to_offset

resampler = extracted_ds.resample(
    {"time": "1M"},
    label="left",
    skipna=False,
)
resampler["time"] = resampler.get_index("time") + to_offset(offset)

Please can anybody from the development team confirm that this is the correct way to do this? Thx.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dcherian
Comment options

Answer selected by dcherian
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dcherian
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants