home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "CONTRIBUTOR" and issue = 246502828 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

  • spencerahill 3

issue 1

  • ENH: three argument version of where · 3 ✖

author_association 1

  • CONTRIBUTOR · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
320755613 https://github.com/pydata/xarray/pull/1496#issuecomment-320755613 https://api.github.com/repos/pydata/xarray/issues/1496 MDEyOklzc3VlQ29tbWVudDMyMDc1NTYxMw== spencerahill 6200806 2017-08-07T19:19:56Z 2017-08-07T19:19:56Z CONTRIBUTOR

any final comments

@jhamman none; thanks @shoyer for including the function-version of where

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: three argument version of where 246502828
318957832 https://github.com/pydata/xarray/pull/1496#issuecomment-318957832 https://api.github.com/repos/pydata/xarray/issues/1496 MDEyOklzc3VlQ29tbWVudDMxODk1NzgzMg== spencerahill 6200806 2017-07-31T03:18:44Z 2017-07-31T03:18:44Z CONTRIBUTOR

Thanks @shoyer. I guess what I had in mind is the case where both x and y are scalars, while cond is still a condition on a. In that case you couldn't do x.where(cond, y); it would require either a.where(cond, x, y) or where(cond, x, y) being supported. Am I understanding that correctly? (If I'm not being clear, consider a concrete case by plugging in e.g. x=-2, y=0, and cond=(a.x + a.y < 5).)

a.where(cond, x, y) might seem odd, since it doesn't actually retain any of a's values, but then it could retain coordinates and attributes, so it might still be useful. And this differs from where(cond, x, y), which it seems would retain cond's coords and attrs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: three argument version of where 246502828
318931493 https://github.com/pydata/xarray/pull/1496#issuecomment-318931493 https://api.github.com/repos/pydata/xarray/issues/1496 MDEyOklzc3VlQ29tbWVudDMxODkzMTQ5Mw== spencerahill 6200806 2017-07-30T21:38:45Z 2017-07-30T21:38:45Z CONTRIBUTOR

How difficult would it be to include np.where's option to provide values for both where the condition is met and where it isn't? From their docstring:

If both x and y are specified, the output array contains elements of x where condition is True, and elements from y elsewhere.

From your example above (haven't gone through the code), what you have implemented in this PR is a special case, namely the xarray analog to np.where(a.x + a.y < 5, a, -1).

I recently had a usecase where this would be handy.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: three argument version of where 246502828

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