8000 propagate indexes in to_dataset, from_dataset by dcherian · Pull Request #3519 · pydata/xarray · GitHub
[go: up one dir, main page]

Skip to content

propagate indexes in to_dataset, from_dataset #3519

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

Merged
merged 14 commits into from
Nov 22, 2019
Merged
Prev Previous commit
Next Next commit
undo groupby change
  • Loading branch information
dcherian committed Nov 13, 2019
commit 433ba711be342cbbe8f004d0c451d60e09cd7a0c
4 changes: 0 additions & 4 deletions xarray/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,8 @@ def _combine(self, applied, restore_coord_dims=False, shortcut=False):
if shortcut:
coord_var = as_variable(coord)
combined._coords[coord.name] = coord_var
if combined._indexes is not None:
combined._indexes[coord.name] = coord_var.to_index()
else:
combined.coords[coord.name] = coord
if combined._indexes is not None:
combined._indexes[coord.name] = coord.to_index()
combined = self._maybe_restore_empty_groups(combined)
combined = self._maybe_unstack(combined)
return combined
Expand Down
0