Skip to content

Fix Dataset.assign_coords overwriting multi-index - #7101

Merged
benbovy merged 2 commits into
pydata:mainfrom
benbovy:fix-assign-coords-dataset-mindex
Sep 28, 2022
Merged

Fix Dataset.assign_coords overwriting multi-index#7101
benbovy merged 2 commits into
pydata:mainfrom
benbovy:fix-assign-coords-dataset-mindex

Conversation

@benbovy

@benbovybenbovy commented Sep 28, 2022

Copy link
Copy Markdown
Member

@dcherian the DeprecationWarning was ignored by default for .assign_coords() because of #6798 (comment). I changed it to FutureWarning so that it is shown for both .assign() and .assign_coords().

The `DeprecationWarning` is ignored by default for `.assign_coords` due
to the
stacklevel (pydata#6798 (comment))
Use `FutureWarning` instead to show the warning for both `.assign` and
`.assign_coords`.

@dcheriandcherian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. LGTM

@benbovy
benbovy merged commit 513ee34 into pydata:mainSep 28, 2022
@benbovy
benbovy deleted the fix-assign-coords-dataset-mindex branch December 8, 2022 09:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken state when using assign_coords with multiindex

2 participants

@benbovy@dcherian