propagate indexes in to_dataset, from_dataset#3519
Merged
dcherian merged 14 commits intopydata:masterfrom Nov 22, 2019
Merged
Conversation
dcherian
commented
Nov 13, 2019
dcherian
commented
Nov 13, 2019
| def __getitem__(self, key): | ||
| return self._indexes[key] | ||
|
|
||
| def __delitem__(self, key): |
Contributor
Author
There was a problem hiding this comment.
undoes my previous change.
I think I understand the indexes model better now. We only use ._indexes dict internally and Indexes is intended for external use. Is that right?
max-sixty
reviewed
Nov 13, 2019
| ): | ||
| return cls._construct_direct( | ||
| variables, coord_names, indexes=indexes, attrs=attrs | ||
| ) |
Collaborator
There was a problem hiding this comment.
I realize this isn't part of this PR, so maybe for another day; does calling _from_vars_and_coord_names do anything different from calling _construct_direct?
* upstream/master: Added fill_value for unstack (pydata#3541) Add DatasetGroupBy.quantile (pydata#3527) ensure rename does not change index type (pydata#3532) Leave empty slot when not using accessors interpolate_na: Add max_gap support. (pydata#3302) units & deprecation merge (pydata#3530) Fix set_index when an existing dimension becomes a level (pydata#3520) add Variable._replace (pydata#3528) Tests for module-level functions with units (pydata#3493) Harmonize `FillValue` and `missing_value` during encoding and decoding steps (pydata#3502) FUNDING.yml (pydata#3523) Allow appending datetime & boolean variables to zarr stores (pydata#3504) warn if dim is passed to rolling operations. (pydata#3513) Deprecate allow_lazy (pydata#3435) Recursive tokenization (pydata#3515)
…ndexes/dataarray * 'indexes/dataarray' of github.com:dcherian/xarray: Update xarray/core/indexes.py
Member
|
Yes, looks good to me!
…On Mon, Nov 18, 2019 at 12:01 PM Deepak Cherian ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In xarray/core/indexes.py
<#3519 (comment)>:
> @@ -100,3 +98,24 @@ def roll_index(index: pd.Index, count: int, axis: int = 0) -> pd.Index:
return index[-count:].append(index[:-count])
else:
return index[:]
+
+
+def copy_indexes(
👍 The current version does this:
new_indexes = {k: v for k, v in indexes.items() if k not in exclude}
which should be fine?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3519?email_source=notifications&email_token=AAJJFVQ4WVPBST3ATQCHVFLQULYDJA5CNFSM4JM5MYX2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCL6VXTA#discussion_r347582088>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJJFVUEM3RJTPGTDSS5JYTQULYDJANCNFSM4JM5MYXQ>
.
|
dcherian
added a commit
to dcherian/xarray
that referenced
this pull request
Nov 25, 2019
* upstream/master: Add drop to api.rst under pending deprecations (pydata#3561) replace duplicate method _from_vars_and_coord_names (pydata#3565) propagate indexes in to_dataset, from_dataset (pydata#3519) Switch examples to notebooks + scipy19 docs improvements (pydata#3557) fix whats-new.rst (pydata#3554)
dcherian
added a commit
to dcherian/xarray
that referenced
this pull request
Dec 4, 2019
* upstream/master: (22 commits) Resolve the version issues on RTD (pydata#3589) Add bottleneck & rasterio git tip to upstream-dev CI (pydata#3585) update whats-new.rst (pydata#3581) Examples for quantile (pydata#3576) add cftime intersphinx entries (pydata#3577) Add pyXpcm to Related Projects doc page (pydata#3578) Reimplement quantile with apply_ufunc (pydata#3559) add environment file for binderized examples (pydata#3568) Add drop to api.rst under pending deprecations (pydata#3561) replace duplicate method _from_vars_and_coord_names (pydata#3565) propagate indexes in to_dataset, from_dataset (pydata#3519) Switch examples to notebooks + scipy19 docs improvements (pydata#3557) fix whats-new.rst (pydata#3554) Tweaks to release instructions (pydata#3555) Clarify conda environments for new contributors (pydata#3551) Revert to dev version 0.14.1 whatsnew (pydata#3547) sparse option to reindex and unstack (pydata#3542) Silence sphinx warnings (pydata#3516) Numpy 1.18 support (pydata#3537) ...
dcherian
added a commit
to dcherian/xarray
that referenced
this pull request
Dec 5, 2019
* upstream/master: (35 commits) fix plotting with transposed nondim coords. (pydata#3441) make coarsen reductions consistent with reductions on other classes (pydata#3500) Resolve the version issues on RTD (pydata#3589) Add bottleneck & rasterio git tip to upstream-dev CI (pydata#3585) update whats-new.rst (pydata#3581) Examples for quantile (pydata#3576) add cftime intersphinx entries (pydata#3577) Add pyXpcm to Related Projects doc page (pydata#3578) Reimplement quantile with apply_ufunc (pydata#3559) add environment file for binderized examples (pydata#3568) Add drop to api.rst under pending deprecations (pydata#3561) replace duplicate method _from_vars_and_coord_names (pydata#3565) propagate indexes in to_dataset, from_dataset (pydata#3519) Switch examples to notebooks + scipy19 docs improvements (pydata#3557) fix whats-new.rst (pydata#3554) Tweaks to release instructions (pydata#3555) Clarify conda environments for new contributors (pydata#3551) Revert to dev version 0.14.1 whatsnew (pydata#3547) sparse option to reindex and unstack (pydata#3542) ...
This was referenced Jan 10, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
happy to make changes!