home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 1417641930 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • weipeng1999 2
  • dcherian 1

author_association 2

  • NONE 2
  • MEMBER 1

issue 1

  • Support .reindex with DataArrays and Dataset as indexers · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1287593498 https://github.com/pydata/xarray/issues/7193#issuecomment-1287593498 https://api.github.com/repos/pydata/xarray/issues/7193 IC_kwDOAMm_X85Mvx4a weipeng1999 38346144 2022-10-22T02:51:50Z 2022-10-22T09:51:43Z NONE

Thanks @weipeng1999 . Can you please provide a minimal example showing the syntax and expected output?

Can I just copy from the doc and use comment to mention the change ``` python In [100]: da = xr.DataArray( ....: np.random.rand(4, 2), ....: [ ....: ("time", pd.date_range("2000-01-01", periods=4)), ....: ("space", ["IA", "IL"]), # do not have the "IN" label ....: ], ....: )

In [101]: times = xr.DataArray( ....: pd.to_datetime(["2000-01-03", "2000-01-02", "2000-01-01"]), dims="new_time" ....: )

In [102]: # use .reindex instead of .sel ....: # and give the parameter : "fill_value" ....: da.reindex(space=xr.DataArray(["IA", "IL", "IN"], dims=["new_time"]), time=times, fill_value=np.nan) Out[102]: <xarray.DataArray (new_time: 3)> array([0.92, 0.34, NaN]) # so fill the missing value by np.nan Coordinates: time (new_time) datetime64[ns] 2000-01-03 2000-01-02 2000-01-01 space (new_time) <U2 'IA' 'IL' 'IN' * new_time (new_time) datetime64[ns] 2000-01-03 2000-01-02 2000-01-01

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support .reindex with DataArrays and Dataset as indexers 1417641930
1287594393 https://github.com/pydata/xarray/issues/7193#issuecomment-1287594393 https://api.github.com/repos/pydata/xarray/issues/7193 IC_kwDOAMm_X85MvyGZ weipeng1999 38346144 2022-10-22T02:57:50Z 2022-10-22T02:57:50Z NONE

So we can guarantee that:

  • .reindex: set the missing value to fill_value (derfault is nan), and the result data may have nan.
  • .fillna: deal the nan in data and the result data will not have nan.
  • .sel: do not change the state.
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support .reindex with DataArrays and Dataset as indexers 1417641930
1287284625 https://github.com/pydata/xarray/issues/7193#issuecomment-1287284625 https://api.github.com/repos/pydata/xarray/issues/7193 IC_kwDOAMm_X85MumeR dcherian 2448579 2022-10-21T18:08:16Z 2022-10-21T18:08:16Z MEMBER

Thanks @weipeng1999 . Can you please provide a minimal example showing the syntax and expected output?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support .reindex with DataArrays and Dataset as indexers 1417641930

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