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
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).
shoyer
changed the title
Combine attrs with conflicting values silently dropped
Option for combine_attrs with conflicting values silently dropped
Jan 1, 2021
merge()
currently supports four options for mergingattrs
: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"
orcombine_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 ofmerge
and other functions/methods that merge coordinates (e.g., apply_ufunc, concat, where, binary arithmetic).cc @keewis
The text was updated successfully, but these errors were encountered: