home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 1473329967 and user = 221526 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • dopplershift · 2 ✖

issue 1

  • Coordinate variable gains coordinate on subset · 2 ✖

author_association 1

  • CONTRIBUTOR 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1338290177 https://github.com/pydata/xarray/issues/7350#issuecomment-1338290177 https://api.github.com/repos/pydata/xarray/issues/7350 IC_kwDOAMm_X85PxLAB dopplershift 221526 2022-12-05T22:56:30Z 2022-12-05T22:56:30Z CONTRIBUTOR

So I'll say that taking my dataset and running nc.squeeze() was illustrative to the problem here. I see now that if a Dataset has scalar coordinates, they apply to every DataArray/Variable inside. So I see what prompts the current behavior.

I think the mismatch in my mental model is due to me coming from netCDF CF land, where coordinates for a variable are based on: 1. Other variables that match relevant shared dimension names 2. Those explicitly listed in the coordinates attribute

I see now that xarray does NOT implement that model.

This was provoked by challenges creating a new DataArray, but I see those can be solved by passing in both dims and coords (when coords contains some scalar coords).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Coordinate variable gains coordinate on subset 1473329967
1337859447 https://github.com/pydata/xarray/issues/7350#issuecomment-1337859447 https://api.github.com/repos/pydata/xarray/issues/7350 IC_kwDOAMm_X85Pvh13 dopplershift 221526 2022-12-05T17:57:34Z 2022-12-05T17:57:34Z CONTRIBUTOR

IMO, it's not correctly implementing the rule as you phrased it. You said "still present", which isn't the case here since the coordinate wasn't present before.

The behavior I'd advocate for is that a subsetting/selection operation should never add new coordinates that weren't previously present. That by itself would be less surprising. It would also help make things more sensible given that the coordinate is only added currently in the scalar case--if you ask for more data, the coordinate isn't added, which is also unexpected given the scalar case.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Coordinate variable gains coordinate on subset 1473329967

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 19.47ms · About: xarray-datasette