home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "MEMBER", issue = 113499493 and user = 1217238 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

user 1

  • shoyer · 6 ✖

issue 1

  • add rolling_apply method or function · 6 ✖

author_association 1

  • MEMBER · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
159757208 https://github.com/pydata/xarray/issues/641#issuecomment-159757208 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1OTc1NzIwOA== shoyer 1217238 2015-11-25T23:45:22Z 2015-11-25T23:45:22Z MEMBER

Yes, of course :). Sometimes still a useful way to think about things, though maybe it's better not to encourage it. I think it's a similar situation for an explicit Python loop vs Cython for groupby aggregations, but the Python loop actually works OK much of the time (e.g., we use it in xray because we haven't written nd grouped aggregated in Cython or Numba yet).

On Wed, Nov 25, 2015 at 3:43 PM, Jeff Reback notifications@github.com wrote:

it's not how it's implemented

that is MUCH slower that marginal calculations

— Reply to this email directly or view it on GitHub https://github.com/xray/xray/issues/641#issuecomment-159756318.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add rolling_apply method or function 113499493
159756115 https://github.com/pydata/xarray/issues/641#issuecomment-159756115 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1OTc1NjExNQ== shoyer 1217238 2015-11-25T23:42:05Z 2015-11-25T23:42:05Z MEMBER

@jreback probably should move discussion here back to the pandas issue :). I don't see any reason why the iteration for moving windows (with __iter__) should be to be done in Cython. Basically it is just repeated slicing in a loop, e.g., something like

def __iter__(self): for n in range(...): yield self.obj[n : n + self.window]

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add rolling_apply method or function 113499493
159754708 https://github.com/pydata/xarray/issues/641#issuecomment-159754708 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1OTc1NDcwOA== shoyer 1217238 2015-11-25T23:30:06Z 2015-11-25T23:30:06Z MEMBER

@jreback yes, for custom iteration like how you can use __iter__ on groupby. It's not hard to do and it seems like it makes sense for consistency.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add rolling_apply method or function 113499493
151577783 https://github.com/pydata/xarray/issues/641#issuecomment-151577783 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1MTU3Nzc4Mw== shoyer 1217238 2015-10-27T17:26:13Z 2015-11-25T23:29:19Z MEMBER

Don't hold your breath on the pandas API changes :). This will take some dedicated effort to make it happen in pandas. Frankly, it's probably easier to do it from scratch in xray where we don't have an old API with which to worry about retaining compatibility.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add rolling_apply method or function 113499493
155921711 https://github.com/pydata/xarray/issues/641#issuecomment-155921711 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1NTkyMTcxMQ== shoyer 1217238 2015-11-11T21:54:48Z 2015-11-11T21:54:48Z MEMBER

@jhamman Great, looking forward to it!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add rolling_apply method or function 113499493
151375968 https://github.com/pydata/xarray/issues/641#issuecomment-151375968 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1MTM3NTk2OA== shoyer 1217238 2015-10-27T04:56:39Z 2015-10-27T04:56:39Z MEMBER

Yeah, I've been thinking about this one for a while (see also https://github.com/xray/xray/issues/130)

One possibly improved API over pandas is to make a rolling a method that produces Rolling object (similar to a GroupBy). You could write something like array.rolling(time=7).mean() to do aggregation and could also iterate like for label, windowed in array.rolling(time=7).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add rolling_apply method or function 113499493

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