home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 180638999 and user = 4160723 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

  • benbovy · 5 ✖

issue 1

  • Add `set_index`, `reset_index` and `reorder_levels` methods · 5 ✖

author_association 1

  • MEMBER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
268273685 https://github.com/pydata/xarray/pull/1028#issuecomment-268273685 https://api.github.com/repos/pydata/xarray/issues/1028 MDEyOklzc3VlQ29tbWVudDI2ODI3MzY4NQ== benbovy 4160723 2016-12-20T15:34:34Z 2016-12-20T15:34:34Z MEMBER

This should now behave correctly with optional indexes.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add `set_index`, `reset_index` and `reorder_levels` methods 180638999
260796716 https://github.com/pydata/xarray/pull/1028#issuecomment-260796716 https://api.github.com/repos/pydata/xarray/issues/1028 MDEyOklzc3VlQ29tbWVudDI2MDc5NjcxNg== benbovy 4160723 2016-11-15T22:54:18Z 2016-11-15T22:54:18Z MEMBER

This is ready for another round of review.

I've changed the signature of reset_index to option C. It is also almost ready for #1017 (just added two small TODOs).

Did you go for allowing set_index() to rename variables?

Not yet, but as you said we could safely add this later.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add `set_index`, `reset_index` and `reorder_levels` methods 180638999
258887083 https://github.com/pydata/xarray/pull/1028#issuecomment-258887083 https://api.github.com/repos/pydata/xarray/issues/1028 MDEyOklzc3VlQ29tbWVudDI1ODg4NzA4Mw== benbovy 4160723 2016-11-07T16:37:03Z 2016-11-07T16:37:03Z MEMBER

Just committed review changes.

.reset_index() doesn't accept kwargs anymore, though I don't know what to choose between the options below (currently option A is implemented): - option A: reset_index(dim, levels=None) where dim may accept multiple dimension names (in that case levels must be a list of lists with the same length than dim, or simply None that would then be applied to all given dimensions). - option B: same than option A, reset_index(dim, levels=None), except that dim only accepts one dimension (thus a bit simpler but less flexible). - option C: reset_index(dim_or_levels) where one can provide a list of dimension(s) and/or level(s). This is the most flexible and concise, though maybe less readable. Allow providing both dimensions and levels may be ambiguous too.

if x is a normal (non-multi) Index, array.reset_index('x') is not well defined

Currently .reset_index() doesn't allow resetting normal indexes, but we can wait for #1017 before merging this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add `set_index`, `reset_index` and `reorder_levels` methods 180638999
258497688 https://github.com/pydata/xarray/pull/1028#issuecomment-258497688 https://api.github.com/repos/pydata/xarray/issues/1028 MDEyOklzc3VlQ29tbWVudDI1ODQ5NzY4OA== benbovy 4160723 2016-11-04T17:34:33Z 2016-11-04T17:34:33Z MEMBER

Sorry for the delay @shoyer. I've read your comments above and they all seem relevant. I'll find some time next week to get back on this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add `set_index`, `reset_index` and `reorder_levels` methods 180638999
255070082 https://github.com/pydata/xarray/pull/1028#issuecomment-255070082 https://api.github.com/repos/pydata/xarray/issues/1028 MDEyOklzc3VlQ29tbWVudDI1NTA3MDA4Mg== benbovy 4160723 2016-10-20T10:32:57Z 2016-10-20T10:34:21Z MEMBER

Some API design questions (mostly from @shoyer's review) we need to fix: - We need to choose whether to use dim=indexes kwargs or fixed arg/kwarg relative to a given dimension for the signatures of .set_index(), .reset_index() and .reorder_levels(). - Do we also allow .set_index() to rename the dimension(s) if needed, instead of doing .set_index(...).rename(...) ? Is this a common use case that is worth it? - After discussion in #1017, it seems that we need an easy way to (re)set indexes either to no index or to range(n).

For point 1, my preference goes to dim=indexes kwargs, especially if we need 2 and 3. It's less succinct, but it's more close to the signatures of other xarray methods like .reindex() or .sel(), and it allows (re)setting the indexes of multiple dimensions in a single call. Given 2, I find set_index(new_dim_name=['level_1', 'level_3']) a bit more elegant than set_index(['level_1', 'level_2'], name='new_dim_name'). Given 3, array.reset_index('x') seems ambiguous compared to array.reset_index(x=None) (no index) and, e.g., array.reset_index(x='range') (range(n) index).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add `set_index`, `reset_index` and `reorder_levels` methods 180638999

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