home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 262696381 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • jhamman 3
  • shoyer 2
  • rpnaut 2
  • Zac-HD 1

author_association 3

  • MEMBER 5
  • NONE 2
  • CONTRIBUTOR 1

issue 1

  • Where functionality in xarray including else case (dask compability) · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
396968118 https://github.com/pydata/xarray/issues/1604#issuecomment-396968118 https://api.github.com/repos/pydata/xarray/issues/1604 MDEyOklzc3VlQ29tbWVudDM5Njk2ODExOA== shoyer 1217238 2018-06-13T14:57:25Z 2018-06-13T14:57:25Z MEMBER

Use the xarray.where function. It supports the full ternary if/then/else.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Where functionality in xarray including else case (dask compability) 262696381
396958080 https://github.com/pydata/xarray/issues/1604#issuecomment-396958080 https://api.github.com/repos/pydata/xarray/issues/1604 MDEyOklzc3VlQ29tbWVudDM5Njk1ODA4MA== rpnaut 30219501 2018-06-13T14:29:24Z 2018-06-13T14:29:24Z NONE

The where operator does only allow for an 'ifthen' construct, but not for an 'ifthenelse' construct. I cannot explicitly tell which values to write in the data at those places where the condition is not fullfilled. It is automatically a 'NA'. This leads to a lot of computation time and address a lot of memory.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Where functionality in xarray including else case (dask compability) 262696381
351786205 https://github.com/pydata/xarray/issues/1604#issuecomment-351786205 https://api.github.com/repos/pydata/xarray/issues/1604 MDEyOklzc3VlQ29tbWVudDM1MTc4NjIwNQ== shoyer 1217238 2017-12-14T17:49:56Z 2017-12-14T17:49:56Z MEMBER

Yes, xarray.where() is available in the v0.10 release.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Where functionality in xarray including else case (dask compability) 262696381
351649842 https://github.com/pydata/xarray/issues/1604#issuecomment-351649842 https://api.github.com/repos/pydata/xarray/issues/1604 MDEyOklzc3VlQ29tbWVudDM1MTY0OTg0Mg== Zac-HD 12229877 2017-12-14T09:03:58Z 2017-12-14T09:03:58Z CONTRIBUTOR

Closed by #1496, I think.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Where functionality in xarray including else case (dask compability) 262696381
340986168 https://github.com/pydata/xarray/issues/1604#issuecomment-340986168 https://api.github.com/repos/pydata/xarray/issues/1604 MDEyOklzc3VlQ29tbWVudDM0MDk4NjE2OA== jhamman 2443309 2017-11-01T05:30:19Z 2017-11-01T05:30:19Z MEMBER

@rpnaut - any update here or should we close this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Where functionality in xarray including else case (dask compability) 262696381
335900882 https://github.com/pydata/xarray/issues/1604#issuecomment-335900882 https://api.github.com/repos/pydata/xarray/issues/1604 MDEyOklzc3VlQ29tbWVudDMzNTkwMDg4Mg== jhamman 2443309 2017-10-11T18:16:35Z 2017-10-11T18:16:35Z MEMBER

@rpnaut - You probably don't need to be operating on the data attribute as you are above. However, its not entirely clear what you're trying to do since we're missing some of the scope in your workflow.

If you can create a simpler example of what you're trying to do, I think your use case would make a good StackOverflow question.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Where functionality in xarray including else case (dask compability) 262696381
335810243 https://github.com/pydata/xarray/issues/1604#issuecomment-335810243 https://api.github.com/repos/pydata/xarray/issues/1604 MDEyOklzc3VlQ29tbWVudDMzNTgxMDI0Mw== rpnaut 30219501 2017-10-11T13:31:35Z 2017-10-11T13:31:35Z NONE

Thank you very much, jhamman, for your comment on #1496 . I would really like that feature.

Hopefully, I will find also a way to overcome in my script the problem with simple arithmetic operators on DataSets or DataArrays. I do not like to always access only the data-stream (numpy-array) and not the DataSet or DataArray.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Where functionality in xarray including else case (dask compability) 262696381
334212332 https://github.com/pydata/xarray/issues/1604#issuecomment-334212332 https://api.github.com/repos/pydata/xarray/issues/1604 MDEyOklzc3VlQ29tbWVudDMzNDIxMjMzMg== jhamman 2443309 2017-10-04T16:26:40Z 2017-10-04T16:26:40Z MEMBER

I think the 3-argument version of where implemented in #1496 will suite your purposes. This is currently in the development branch of xarray and will be part of the next 0.10 release.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Where functionality in xarray including else case (dask compability) 262696381

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