html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/641#issuecomment-159757720,https://api.github.com/repos/pydata/xarray/issues/641,159757720,MDEyOklzc3VlQ29tbWVudDE1OTc1NzcyMA==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-159757208,https://api.github.com/repos/pydata/xarray/issues/641,159757208,MDEyOklzc3VlQ29tbWVudDE1OTc1NzIwOA==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-159756318,https://api.github.com/repos/pydata/xarray/issues/641,159756318,MDEyOklzc3VlQ29tbWVudDE1OTc1NjMxOA==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-159756115,https://api.github.com/repos/pydata/xarray/issues/641,159756115,MDEyOklzc3VlQ29tbWVudDE1OTc1NjExNQ==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-159755572,https://api.github.com/repos/pydata/xarray/issues/641,159755572,MDEyOklzc3VlQ29tbWVudDE1OTc1NTU3Mg==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-159754708,https://api.github.com/repos/pydata/xarray/issues/641,159754708,MDEyOklzc3VlQ29tbWVudDE1OTc1NDcwOA==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-151577783,https://api.github.com/repos/pydata/xarray/issues/641,151577783,MDEyOklzc3VlQ29tbWVudDE1MTU3Nzc4Mw==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-159754015,https://api.github.com/repos/pydata/xarray/issues/641,159754015,MDEyOklzc3VlQ29tbWVudDE1OTc1NDAxNQ==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-159753832,https://api.github.com/repos/pydata/xarray/issues/641,159753832,MDEyOklzc3VlQ29tbWVudDE1OTc1MzgzMg==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-155921711,https://api.github.com/repos/pydata/xarray/issues/641,155921711,MDEyOklzc3VlQ29tbWVudDE1NTkyMTcxMQ==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-155884288,https://api.github.com/repos/pydata/xarray/issues/641,155884288,MDEyOklzc3VlQ29tbWVudDE1NTg4NDI4OA==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-151547310,https://api.github.com/repos/pydata/xarray/issues/641,151547310,MDEyOklzc3VlQ29tbWVudDE1MTU0NzMxMA==,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}",,113499493
https://github.com/pydata/xarray/issues/641#issuecomment-151375968,https://api.github.com/repos/pydata/xarray/issues/641,151375968,MDEyOklzc3VlQ29tbWVudDE1MTM3NTk2OA==,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}",,113499493