html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/442#issuecomment-115561175,https://api.github.com/repos/pydata/xarray/issues/442,115561175,MDEyOklzc3VlQ29tbWVudDExNTU2MTE3NQ==,3404817,2015-06-26T07:28:54Z,2015-06-26T07:28:54Z,CONTRIBUTOR,"That makes sense. Great that there is an option to `keep_attrs`. Closing this issue.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,90658514
https://github.com/pydata/xarray/issues/442#issuecomment-115356215,https://api.github.com/repos/pydata/xarray/issues/442,115356215,MDEyOklzc3VlQ29tbWVudDExNTM1NjIxNQ==,1217238,2015-06-25T18:30:45Z,2015-06-25T18:50:08Z,MEMBER,"Ah. So this is intentional. There is an optional parameter that lets you control this -- try `.mean(keep_attrs=True)`.
The basic problem is that it's ambiguous how to handle attributes like units after doing computation. I don't want to inspect attributes and choose some to preserve and others to remove, so we have a choice of either preserving all attributes in an operation or removing all of them.
Obviously, for some aggregations (e.g., `sum` or `var`) it doesn't make sense to preserve attributes (which commonly include units). I suppose we could make an exception for aggregations like mean/median/std, but it's also weird to have some aggregations that preserve attributes and others that don't.
","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,90658514
https://github.com/pydata/xarray/issues/442#issuecomment-115177414,https://api.github.com/repos/pydata/xarray/issues/442,115177414,MDEyOklzc3VlQ29tbWVudDExNTE3NzQxNA==,3404817,2015-06-25T09:10:26Z,2015-06-25T09:10:38Z,CONTRIBUTOR,"Sorry for the confusion! The loss of attributes actually occurs when applying `.mean()` (rather than `.load()`).
See this [notebook](https://gist.github.com/j08lue/c4a6b4bd504c0a7598b2) (same in [nbviewer](http://nbviewer.ipython.org/gist/j08lue/c4a6b4bd504c0a7598b2)) for an example with some opendap-hosted data.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,90658514
https://github.com/pydata/xarray/issues/442#issuecomment-114969596,https://api.github.com/repos/pydata/xarray/issues/442,114969596,MDEyOklzc3VlQ29tbWVudDExNDk2OTU5Ng==,1217238,2015-06-24T18:20:57Z,2015-06-24T18:20:57Z,MEMBER,"Could you post an example dataset/code for which this occurs? I'm struggling to reproduce this.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,90658514
https://github.com/pydata/xarray/issues/442#issuecomment-114949306,https://api.github.com/repos/pydata/xarray/issues/442,114949306,MDEyOklzc3VlQ29tbWVudDExNDk0OTMwNg==,1217238,2015-06-24T17:32:05Z,2015-06-24T17:32:05Z,MEMBER,"Hmm. This is definitely a bug -- load should preserve all metadata.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,90658514