home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 489825483 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

  • Hoeze 2
  • shoyer 1
  • TomNicholas 1

author_association 2

  • MEMBER 2
  • NONE 2

issue 1

  • [proposal] concatenate by axis, ignore dimension names · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
529390440 https://github.com/pydata/xarray/issues/3281#issuecomment-529390440 https://api.github.com/repos/pydata/xarray/issues/3281 MDEyOklzc3VlQ29tbWVudDUyOTM5MDQ0MA== Hoeze 1200058 2019-09-09T09:48:46Z 2019-09-09T09:48:46Z NONE

@TomNicholas No, not really. Stack can be only used to combine multiple coordinates into one coordinate, e.g. data[x, y, z] -> stacked_data[a, z] with a as a multi-index of x and y.

In this case, we do not have shared data with coordinates to combine.
Instead, multiple independent DataArrays should be concatenated along some dimension.

The most similar methods to this one are xr.concat and xr.combine_nested. However, they do not allow to implicitly rename dimensions and force-delete non-shared metadata.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  [proposal] concatenate by axis, ignore dimension names 489825483
529155045 https://github.com/pydata/xarray/issues/3281#issuecomment-529155045 https://api.github.com/repos/pydata/xarray/issues/3281 MDEyOklzc3VlQ29tbWVudDUyOTE1NTA0NQ== TomNicholas 35968931 2019-09-07T23:34:30Z 2019-09-07T23:34:30Z MEMBER

@Hoeze is it possible to use xarray.stack for your example? e.g.

python features_i = ("features_1", "features_2", ..., "features_n") x_combined = original.stack(features=features_i)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  [proposal] concatenate by axis, ignore dimension names 489825483
528528962 https://github.com/pydata/xarray/issues/3281#issuecomment-528528962 https://api.github.com/repos/pydata/xarray/issues/3281 MDEyOklzc3VlQ29tbWVudDUyODUyODk2Mg== Hoeze 1200058 2019-09-05T19:05:20Z 2019-09-05T19:06:13Z NONE

Thanks for your answer @shoyer. OK, then this can be closed, since this function should actually remove metadata for me :)

For example, lets consider a dataset with: - dimensions:
("obs", "features_1", "features_2", ..., "features_n") - variables:
x1 ("obs", "features_1"), x2 ("obs", "features_2"), ..., xn ("obs", "features_n")

Now I want to stick those side-by-side to get an array x_combined ("obs", "features") with features = features_1 + ... + features_n".

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  [proposal] concatenate by axis, ignore dimension names 489825483
528518051 https://github.com/pydata/xarray/issues/3281#issuecomment-528518051 https://api.github.com/repos/pydata/xarray/issues/3281 MDEyOklzc3VlQ29tbWVudDUyODUxODA1MQ== shoyer 1217238 2019-09-05T18:37:22Z 2019-09-05T18:37:22Z MEMBER

Thanks for the suggestion!

Generally we try to keep all of xarray's functions "metadata aware", rather overriding metadata. So the API feels a little out of place to me.

Maybe you could share a little bit more about your use case for this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  [proposal] concatenate by axis, ignore dimension names 489825483

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