home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "MEMBER" and issue = 569176457 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • mrocklin 1
  • max-sixty 1
  • keewis 1

issue 1

  • Self joins with non-unique indexes · 3 ✖

author_association 1

  • MEMBER · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
604537050 https://github.com/pydata/xarray/issues/3791#issuecomment-604537050 https://api.github.com/repos/pydata/xarray/issues/3791 MDEyOklzc3VlQ29tbWVudDYwNDUzNzA1MA== keewis 14808389 2020-03-26T16:39:38Z 2020-03-26T16:39:38Z MEMBER

The only way I could come up with is: python In [2]: a = xr.DataArray( ...: name="sample_id", ...: data=[1, 2, 3], ...: dims="population_name", ...: coords={"population_name": ["AFR", "EUR", "EUR"]}, ...: ) ...: b = xr.DataArray( ...: name="population_size", ...: data=[10, 100], ...: dims="population_name", ...: coords={"population_name": ["AFR", "EUR"]}, ...: ) ...: a.to_dataset().assign({b.name: b.sel(population_name=a.population_name)}) Out[2]: <xarray.Dataset> Dimensions: (population_name: 3) Coordinates: * population_name (population_name) <U3 'AFR' 'EUR' 'EUR' Data variables: sample_id (population_name) int64 1 2 3 population_size (population_name) int64 10 100 100 which is a manual join?

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Self joins with non-unique indexes 569176457
598800439 https://github.com/pydata/xarray/issues/3791#issuecomment-598800439 https://api.github.com/repos/pydata/xarray/issues/3791 MDEyOklzc3VlQ29tbWVudDU5ODgwMDQzOQ== mrocklin 306380 2020-03-13T16:12:53Z 2020-03-13T16:12:53Z MEMBER

I wonder if there are multi-dimensional analogs that might be interesting.

@eric-czech , if you have time to say a bit more about the data and operation that you're trying to do I think it would be an interesting exercise to see how to do that operation with Xarray's current functionality. I wouldn't be surprised to learn that there was some way to do what you wanted that went under a different name here.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Self joins with non-unique indexes 569176457
595406486 https://github.com/pydata/xarray/issues/3791#issuecomment-595406486 https://api.github.com/repos/pydata/xarray/issues/3791 MDEyOklzc3VlQ29tbWVudDU5NTQwNjQ4Ng== max-sixty 5635139 2020-03-05T19:32:38Z 2020-03-05T19:32:38Z MEMBER

Hi @eric-czech -- thanks for the issue.

Unfortunately xarray isn't strong as these sort of relational joins, and I don't think there's a way of doing that specific operation. Relational algebra generally depends on data on a single dimension, which fits into xarray's model less well.

Feel free to post back here with contiguous questions, though

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Self joins with non-unique indexes 569176457

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