Skip to content

Conversation

@ianhi
Copy link
Contributor

@ianhi ianhi commented Dec 12, 2025

@ianhi ianhi changed the title add drop_existing kwarg to set_xindex add drop_existing kwarg to set_xindex Dec 12, 2025
@dcherian dcherian requested a review from benbovy December 12, 2025 18:31
Copy link
Member

@benbovy benbovy left a comment

Choose a reason for hiding this comment

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

Thanks @ianhi, I think that this is a convenient addition!

I'd just rename drop_existing to simply drop. The latter is a bit less self-explanatory but more consistent with the rest of the Xarray API where drop is already a parameter of many methods like .reset_index, .reset_coords, .isel, .where, etc.

Sign up for free to 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.

Add new kwarg drop_existing to set_xindex

2 participants