home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 115356215

This data as json

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-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
Powered by Datasette · Queries took 0.425ms · About: xarray-datasette