home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 39919261

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
39919261 MDU6SXNzdWUzOTkxOTI2MQ== 211 Should iterating over a Dataset include coordinates? 1217238 closed 0   740776 0 2014-08-10T23:13:47Z 2014-09-05T03:16:53Z 2014-09-05T03:16:53Z MEMBER      

My inclination is no: the contents of a Dataset (e.g., list(ds), ds.keys() and ds.values()) should only include non-coordinates.

__contains__ checks for a coordinate (e.g., 'time') would need to look in ds.dimensions or ds.coordinates instead of ds, but I see no need to __getitem__: ds['time'] can still work.

Pluses: 1. This change would more closely align xray.Dataset with pandas.DataFrame, which also does not include any elements of the index in the contents of the frame. 2. It would eliminate the need for using ds.noncoordinates -- which, as @ToddSmall has pointed out, is not very intuitive. 3. In my experience, I have been using ds.noncoordinates.items() more often than ds.items() (which contains redundant information, as coordinates are repeated). The only time I really want to iterate over all variables in a dataset is when I'm using the lower level Variable API.

Negatives: 1. This would break the existing API.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/211/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

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