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

assign_coords reset all dimension coords to default (pandas) index #7346

Closed
4 tasks done
benbovy opened this issue Dec 2, 2022 · 0 comments · Fixed by #7347
Closed
4 tasks done

assign_coords reset all dimension coords to default (pandas) index #7346

benbovy opened this issue Dec 2, 2022 · 0 comments · Fixed by #7347

Comments

@benbovy
Copy link
Member

benbovy commented Dec 2, 2022

What happened?

See https://github.com/martinfleis/xvec/issues/13#issue-1472023524

What did you expect to happen?

assign_coords() should preserve the index of coordinates that are not updated or not part of a dropped multi-coordinate index.

Minimal Complete Verifiable Example

See https://github.com/martinfleis/xvec/issues/13#issue-1472023524

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

No response

Anything else we need to know?

No response

Environment

Xarray version 2022.11.0
@benbovy benbovy added bug needs triage Issue that has not been reviewed by xarray team member topic-indexing and removed needs triage Issue that has not been reviewed by xarray team member labels Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant