home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 180638999 and user = 1217238 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

  • shoyer · 3 ✖

issue 1

  • Add `set_index`, `reset_index` and `reorder_levels` methods · 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
267509336 https://github.com/pydata/xarray/pull/1028#issuecomment-267509336 https://api.github.com/repos/pydata/xarray/issues/1028 MDEyOklzc3VlQ29tbWVudDI2NzUwOTMzNg== shoyer 1217238 2016-12-16T03:33:40Z 2016-12-16T03:33:40Z MEMBER

Can we update this for optional indexes? (now on master)

{
    "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
259476665 https://github.com/pydata/xarray/pull/1028#issuecomment-259476665 https://api.github.com/repos/pydata/xarray/issues/1028 MDEyOklzc3VlQ29tbWVudDI1OTQ3NjY2NQ== shoyer 1217238 2016-11-09T17:43:31Z 2016-11-09T17:43:31Z MEMBER

I kind of like Option C, given that we have guaranteed level names and variables to have no conflicts.

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

{
    "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
255498340 https://github.com/pydata/xarray/pull/1028#issuecomment-255498340 https://api.github.com/repos/pydata/xarray/issues/1028 MDEyOklzc3VlQ29tbWVudDI1NTQ5ODM0MA== shoyer 1217238 2016-10-22T01:18:40Z 2016-10-22T01:18:40Z MEMBER

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().

For set_index and reorder_levels, I like the kwargs or a dictionary. It's nice and explicit. But for reset_index, I think we probably want a list.

It's not at all obvious to me what array.reset_index(x=None) does. It could just as easily mean "reset nothing from x" as "reset x to have a null index". In fact, the former seems more consistent with how we handle levels. In contrast, array.reset_index(['x']) pretty clearly means that the 'x' index should be reset.

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?

My inclination is yes -- this feels like a common thing to do. But we could also safely add this later.

After discussion in #1017, it seems that we need an easy way to (re)set indexes either to no index or to range(n).

We definitely need a way to reset indexes to the default, but after #1017, I'm not sure we will need a way to set them to range(n).

Unfortunately, if x is a normal (non-multi) Index, array.reset_index('x') is not well defined. We need a name for the variable that was formerly named x (or could drop it, e.g., with array.reset_index('x', drop=True) or array.drop('x')), otherwise it will still be the index for the x-axis. Or, I suppose we could rename the x dimension to something else.

One option is to add some sort of prefix or suffix to the index name when it becomes a new variable, e.g., array.reset_index('x') renames the coordinate x to x_. This seems like a probably safe choice, though I hate to add more automatic names to the API.

{
    "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 156.651ms · About: xarray-datasette