home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 397092870

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/2230#issuecomment-397092870 https://api.github.com/repos/pydata/xarray/issues/2230 397092870 MDEyOklzc3VlQ29tbWVudDM5NzA5Mjg3MA== 1217238 2018-06-13T21:27:33Z 2018-06-13T21:27:33Z MEMBER

OK, I see you already saw the pandas issues :).

For earth science it would be nice to have an option telling xarray what to do in case of a sum over values being all NA. Do you see a chance to have a fast fix for that issue in the model code?

Yes, I would be very open to adding a min_count argument.

We could probably copy the implementation of sum with min_count largely from pandas: https://github.com/pandas-dev/pandas/blob/0c4e611927772af44b02204192b29282341a5716/pandas/core/nanops.py#L329

In xarray this would go into _create_nan_agg_method in https://github.com/pydata/xarray/blob/master/xarray/core/duck_array_ops.py (sorry, this has gotten a little messy!)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  331981984
Powered by Datasette · Queries took 0.732ms · About: xarray-datasette