home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 163753490

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/673#issuecomment-163753490 https://api.github.com/repos/pydata/xarray/issues/673 163753490 MDEyOklzc3VlQ29tbWVudDE2Mzc1MzQ5MA== 1217238 2015-12-10T21:23:29Z 2015-12-10T21:23:29Z MEMBER

how is the mean taken when using groupby or resample, does it count the number hours or days in the dataset and how does it deal with missing data?

Xray using dask/numpy's nanmean, which skips over NaN values, including them neither in the count of elements nor the sum (the mean is given by the sum divided by the count). It's similar for nanmax. So to answer your question, it should count the actual number of hours in the dataset with non-NaN values. Neither resample nor groupby have any a priori knowledge of the number of elements in a group beyond what they see in the data.

There have been some related dask.array bugs that we've squashed over the past few months (in particular for nanmax), so I would make sure that you're running the latest release of dask.array. But if that doesn't fix things, a more detailed report would help!

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