home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 113499493 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • shoyer 6
  • jreback 5
  • jhamman 2

issue 1

  • add rolling_apply method or function · 13 ✖

author_association 1

  • MEMBER 13
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
159757720 https://github.com/pydata/xarray/issues/641#issuecomment-159757720 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1OTc1NzcyMA== jreback 953992 2015-11-25T23:47:08Z 2015-11-25T23:47:08Z MEMBER

yep, agreed. anyhow I created a new issue for it https://github.com/pydata/pandas/issues/11704

{
    "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
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
159756318 https://github.com/pydata/xarray/issues/641#issuecomment-159756318 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1OTc1NjMxOA== jreback 953992 2015-11-25T23:43:03Z 2015-11-25T23:43:03Z MEMBER

it's not how it's implemented

that is MUCH slower that marginal calculations

{
    "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
159755572 https://github.com/pydata/xarray/issues/641#issuecomment-159755572 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1OTc1NTU3Mg== jreback 953992 2015-11-25T23:37:24Z 2015-11-25T23:37:24Z MEMBER

right, I think I will open a new issue for that. its actually a bit tricky as the iteration is done in cython itself, and its a marginal calculation anyhow (e.g. you just keep adding the new value, subtracting values that fall off the 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
159754015 https://github.com/pydata/xarray/issues/641#issuecomment-159754015 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1OTc1NDAxNQ== jreback 953992 2015-11-25T23:24:09Z 2015-11-25T23:24:09Z MEMBER

ohh, @shoyer you are thinking about defining __iter__ on the Rolling, for a custom aggregation? or other reason

{
    "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
159753832 https://github.com/pydata/xarray/issues/641#issuecomment-159753832 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1OTc1MzgzMg== jreback 953992 2015-11-25T23:22:51Z 2015-11-25T23:22:51Z MEMBER

@shoyer breath holding :) https://github.com/pydata/pandas/pull/11603

{
    "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
155884288 https://github.com/pydata/xarray/issues/641#issuecomment-155884288 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1NTg4NDI4OA== jhamman 2443309 2015-11-11T19:22:02Z 2015-11-11T19:22:02Z MEMBER

@shoyer - I'm going to give creating a Rolling object a go. I have a paper I want to write using this functionality so there is a carrot motivating me.

{
    "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
151547310 https://github.com/pydata/xarray/issues/641#issuecomment-151547310 https://api.github.com/repos/pydata/xarray/issues/641 MDEyOklzc3VlQ29tbWVudDE1MTU0NzMxMA== jhamman 2443309 2015-10-27T15:49:24Z 2015-10-27T15:49:24Z MEMBER

I like the idea of a Rolling object. It would great if we could leverage that option from the Pandas api when it comes around.

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