home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

1 row where issue = 423632904 and user = 3621629 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

  • 0x0L · 1 ✖

issue 1

  • Dropping values along multidimensions · 1 ✖

author_association 1

  • CONTRIBUTOR 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
499285779 https://github.com/pydata/xarray/issues/2834#issuecomment-499285779 https://api.github.com/repos/pydata/xarray/issues/2834 MDEyOklzc3VlQ29tbWVudDQ5OTI4NTc3OQ== 0x0L 3621629 2019-06-05T22:56:00Z 2019-06-05T22:58:18Z CONTRIBUTOR

Hello @maxdow

I'm not sure I understand your issue correctly. If all you want is to keep only the points time, lat, lon for which t and/or dd is not NA you can simply use ```python z = d.stack(index=d.dims).dropna('index', how='all')

<xarray.Dataset> Dimensions: (index: 346) Coordinates: * index (index) MultiIndex - time (index) datetime64[ns] 2019-03-09 2019-03-09 ... 2019-03-09 - lat (index) float64 43.5 43.5 43.5 43.75 43.75 ... 45.0 45.0 45.5 45.5 - lon (index) float64 1.25 1.5 4.25 1.75 2.25 ... 1.75 2.0 4.0 1.5 2.0 Data variables: t (index) float64 0.6184 0.2966 1.426 0.8666 ... 0.09348 1.271 1.353 dd (index) float64 2.075 1.174 0.906 0.6451 ... 0.3491 0.1789 0.8922 You still have access to the coordinates of the valid points through `z.time`, `z.lat` and `z.lon`:python z.lat

<xarray.DataArray 'lat' (index: 346)> array([43.5 , 43.5 , 43.5 , ..., 51.25, 51.25, 51.25]) Coordinates: * index (index) MultiIndex - time (index) datetime64[ns] 2019-03-09 2019-03-09 ... 2019-03-09 - lat (index) float64 43.5 43.5 43.5 43.75 43.75 ... 45.0 45.0 45.5 45.5 - lon (index) float64 1.25 1.5 4.25 1.75 2.25 ... 1.75 2.0 4.0 1.5 2.0 ```

One can still unstack this and achieve the equivalent of multi-dimensional dropna. However in your example all the coordinates for time look equal (they shouldn't be) and this will prevent unstacking.

I hope this helps

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dropping values along multidimensions 423632904

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 12.739ms · About: xarray-datasette