home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1841227199

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1841227199 I_kwDOAMm_X85tvuW_ 8055 Documentation of `Dataset.count()` is ambiguous 90768774 closed 0     3 2023-08-08T12:35:59Z 2023-08-09T13:50:56Z 2023-08-09T13:50:56Z CONTRIBUTOR      

What is your issue?

Hello everyone!

I've noticed that the documentation for Dataset.count and DataArray.count is a little unclear with respect to what it actually does. In my experience, it's not immediately obvious when looking at this site whether zero values are counted or not.

The given example does not contain a 0 value that would clarify this, and what is worse is that the "see also" section points to np.count and to dask.array.count which do not exist. The closest NumPy equivalent is np.count_nonzero, which has a different behavior to the xarray count method. The xarray count is actually equivalent to Pandas DataFrame.count, which count all non-NA values including 0.

I would take a shot at writing a clearer docstring but I'm not sure how to do that using the generate_aggregations.py file...

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8055/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 0 rows from issue in issue_comments
Powered by Datasette · Queries took 0.766ms · About: xarray-datasette