home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • jsignell 7

issue 1

  • Make `dim` optional on unstack · 7 ✖

author_association 1

  • CONTRIBUTOR · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
417430252 https://github.com/pydata/xarray/pull/2375#issuecomment-417430252 https://api.github.com/repos/pydata/xarray/issues/2375 MDEyOklzc3VlQ29tbWVudDQxNzQzMDI1Mg== jsignell 4806877 2018-08-30T18:58:35Z 2018-08-30T18:58:35Z CONTRIBUTOR

Great! Thanks so much for all the feedback :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make `dim` optional on unstack 352677925
415493314 https://github.com/pydata/xarray/pull/2375#issuecomment-415493314 https://api.github.com/repos/pydata/xarray/issues/2375 MDEyOklzc3VlQ29tbWVudDQxNTQ5MzMxNA== jsignell 4806877 2018-08-23T17:02:15Z 2018-08-23T17:02:15Z CONTRIBUTOR

Thanks for the context!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make `dim` optional on unstack 352677925
415490818 https://github.com/pydata/xarray/pull/2375#issuecomment-415490818 https://api.github.com/repos/pydata/xarray/issues/2375 MDEyOklzc3VlQ29tbWVudDQxNTQ5MDgxOA== jsignell 4806877 2018-08-23T16:56:07Z 2018-08-23T16:56:07Z CONTRIBUTOR

I can change it. I guess I was looking at Dataset.transpose: https://github.com/pydata/xarray/blob/master/xarray/core/dataset.py#L2498

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make `dim` optional on unstack 352677925
415473341 https://github.com/pydata/xarray/pull/2375#issuecomment-415473341 https://api.github.com/repos/pydata/xarray/issues/2375 MDEyOklzc3VlQ29tbWVudDQxNTQ3MzM0MQ== jsignell 4806877 2018-08-23T16:06:51Z 2018-08-23T16:06:51Z CONTRIBUTOR

I chose to use *dims rather than a list of dims so that this change will have a very small impact on people. Most people probably do something like unstack('z') right now, and that will still work.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make `dim` optional on unstack 352677925
415437261 https://github.com/pydata/xarray/pull/2375#issuecomment-415437261 https://api.github.com/repos/pydata/xarray/issues/2375 MDEyOklzc3VlQ29tbWVudDQxNTQzNzI2MQ== jsignell 4806877 2018-08-23T14:29:01Z 2018-08-23T14:29:01Z CONTRIBUTOR

Ok so in this PR I will make unstack accept multiple dims like xr.DataFrame.unstack(*dims). The order of the dims will only be roundtripped if all dims are stacked into one, but I think that is reasonable.

In a follow on PR I will make xarray.label_like(array, other). I think that notation speaks more to what we are trying to convey, but I do think the position of the arguments isn't intuitive.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make `dim` optional on unstack 352677925
415099271 https://github.com/pydata/xarray/pull/2375#issuecomment-415099271 https://api.github.com/repos/pydata/xarray/issues/2375 MDEyOklzc3VlQ29tbWVudDQxNTA5OTI3MQ== jsignell 4806877 2018-08-22T16:44:47Z 2018-08-22T17:46:24Z CONTRIBUTOR

we have similar method reset_index. Do we also want to make dim optional?

I don't have an opinion on that except to say that reset_index takes an iter of dims so it is at least slightly different. So to me it seems fine to only make dim optional on unstack.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make `dim` optional on unstack 352677925
415053454 https://github.com/pydata/xarray/pull/2375#issuecomment-415053454 https://api.github.com/repos/pydata/xarray/issues/2375 MDEyOklzc3VlQ29tbWVudDQxNTA1MzQ1NA== jsignell 4806877 2018-08-22T14:32:51Z 2018-08-22T15:23:27Z CONTRIBUTOR

what should be done if DataArray or Dataset has multiple MultiIndexes. Maybe do we unstack all the MultiIndexes?

I like the idea of unstacking all the MultiIndexes, but in that case should we allow passing in multiple dims? It seems weird to do a recursive unstack in the case of no argument passed without allowing the user to specifically choose multiple dims along which to unstack.

I think it is probably better to just choose a default dim to unstack like this PR does. But maybe it is better to choose the first dim that is MultiIndex rather than the first dim. That way if you do a stack().unstack() you will roundtrip your data since the stacked index gets added to the end of dims. And if you just pass an object with one MultiIndex (probably the most common scenario) unstack will do the right thing. And if you pass an object with multiple MultiIndexes and unstack repeatedly, you will get your original data out.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make `dim` optional on unstack 352677925

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