home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

1 row where issue = 35682274 and user = 12852539 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

  • benjimin · 1 ✖

issue 1

  • groupby should work with name=None · 1 ✖

author_association 1

  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
254676127 https://github.com/pydata/xarray/issues/158#issuecomment-254676127 https://api.github.com/repos/pydata/xarray/issues/158 MDEyOklzc3VlQ29tbWVudDI1NDY3NjEyNw== benjimin 12852539 2016-10-19T00:18:53Z 2016-10-19T00:25:38Z NONE

Why won't this be fixed?

I think some clarification in the documentation would be useful. Currently they say:

xarray supports “group by” operations with the same API as pandas [and that the required parameter for Dataset/DataArray.groupby is an] Array whose unique values should be used to group this array.

However, pandas supports grouping by a function or by any array (e.g. it can be a pandas object or a numpy array). The xarray API is narrower than pandas, and has an undocumented requirement of a named DataArray (contrasting xarray behaviour of creating default names like "dim_0" elsewhere).

``` python import numpy as np data = np.arange(10) + 10 # test data f = lambda x: np.floor_divide(x,2) # grouping key

import pandas as pd for key in f, f(data), pd.Series(f(data)): print pd.Series(data).groupby(key).mean().values print pd.DataFrame({'thing':data}).groupby(key).mean().thing.values

these pandas examples are all equivalent

import xarray as xr da = xr.DataArray(data) key = xr.DataArray(f(data)) key2 = xr.DataArray(f(data), name='key') print da.groupby(key2).mean().values # this line works print da.groupby(key).mean().values # broken: ValueError: group must have a name ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  groupby should work with name=None 35682274

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