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/324#issuecomment-131878081,https://api.github.com/repos/pydata/xarray/issues/324,131878081,MDEyOklzc3VlQ29tbWVudDEzMTg3ODA4MQ==,2443309,2015-08-17T16:20:14Z,2015-08-17T16:20:14Z,MEMBER,"Agreed, we have two use cases here.
For (1), can we just use the pandas grouping infrastructure. We just need to allow `xray.DataArray.groupby` to support an iterable and `pandas.Grouper` objects. I personally don't like the MultiIndex format and prefer to unstack the grouper operations when possible. In xray, I think we can justify going that route since we support N-D labeled dimensions much better than pandas.
For (2), I'll need to think a bit more about how this would work. Do we add a groupby method to `DataArrayGroupBy`? That sounds messy. Maybe we need to write a N-D grouper object?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,58117200
https://github.com/pydata/xarray/issues/324#issuecomment-131599877,https://api.github.com/repos/pydata/xarray/issues/324,131599877,MDEyOklzc3VlQ29tbWVudDEzMTU5OTg3Nw==,2443309,2015-08-16T18:51:05Z,2015-08-17T16:07:41Z,MEMBER,"@shoyer -
I want to look into putting a PR together for this. I'm looking for the same functionality that you get with a pandas Series or DataFrame:
``` Python
data.groupby([lambda x: x.hour, lambda x: x.timetuple().tm_yday]).mean()
```
The motivation comes in making a [Hovmoller diagram](https://en.wikipedia.org/wiki/Hovm%C3%B6ller_diagram). What we need is this functionality:
``` Python
da.groupby(['time.hour', 'time.dayofyear']).mean().plot()
```
If you can point me in the right direction, I'll see if I can put something together.
","{""total_count"": 7, ""+1"": 7, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,58117200