You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option for combine_attrs with conflicting values silently dropped #4749
merge() currently supports four options for merging attrs:
combine_attrs : {"drop", "identical", "no_conflicts", "override"}, \
default: "drop"
String indicating how to combine attrs of the objects being merged:
- "drop": empty attrs on returned Dataset.
- "identical": all attrs must be the same on every object.
- "no_conflicts": attrs from all objects are combined, any that have
the same name must also have the same value.
- "override": skip comparing and copy attrs from the first dataset to
the result.
It would be nice to have an option to combine attrs from all objects like "no_conflicts", but that drops attributes with conflicting values rather than raising an error. We might call this combine_attrs="drop_conflicts" or combine_attrs="matching".
This is similar to how xarray currently handles conflicting values for DataArray.name and would be more suitable to consider for the default behavior of merge and other functions/methods that merge coordinates (e.g., apply_ufunc, concat, where, binary arithmetic).
changed the title [-]Combine attrs with conflicting values silently dropped[/-][+]Option for combine_attrs with conflicting values silently dropped[/+]on Jan 1, 2021
Activity
[-]Combine attrs with conflicting values silently dropped[/-][+]Option for combine_attrs with conflicting values silently dropped[/+]