keep attrs when reducing xray objects · Issue #138 · pydata/xarray (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Reduction operations currently drop all Variable
and Dataset
attrs
when a reduction operation is performed. I'm proposing adding a keyword to these methods to allow for copying of the original Variable
or Dataset
attrs
.
The default value of the keep_attrs
keyword would be False
.
For example:
new = ds.mean(keep_attrs=True)
returns new
with all the Variable
and Dataset
attrs
as ds
contained.