-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
.resample now supports loffset. #2608
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
Conversation
Hello @dcherian! Thanks for submitting the PR.
|
…ture/loffset * 'feature/loffset' of github.com:dcherian/xarray: Update whats-new.rst
@@ -700,7 +703,8 @@ def resample(self, indexer=None, skipna=None, closed=None, label=None, | |||
|
|||
group = DataArray(dim_coord, coords=dim_coord.coords, | |||
dims=dim_coord.dims, name=RESAMPLE_DIM) | |||
grouper = pd.Grouper(freq=freq, closed=closed, label=label, base=base) | |||
grouper = pd.Grouper(freq=freq, closed=closed, label=label, base=base, | |||
loffset=pd.tseries.frequencies.to_offset(loffset)) |
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.
Do we need this explicit cast with pd.tseries.frequencies.to_offset
? I guess it's safe to use since it's listed in the pandas API docs explicitly, but I get a little nervous about digging into internals in other projects.
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.
It's needed for pandas 0.19.2 which is our minimum version. on 0.23 pandas does the cast automatically.
* master: .resample now supports loffset. (pydata#2608) Remove failing Appveyor Python 2.7 32-bit build (pydata#2617) Remove meaningless tz argument in cftime_range (pydata#2613) doc fixes. (pydata#2611) Fix parsing '_Unsigned' attribute (pydata#2584) fix a few typos in rst files (pydata#2607)
whats-new.rst
for all changes andapi.rst
for new API