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/1041#issuecomment-252294581,https://api.github.com/repos/pydata/xarray/issues/1041,252294581,MDEyOklzc3VlQ29tbWVudDI1MjI5NDU4MQ==,10050469,2016-10-07T16:13:00Z,2016-10-07T16:13:00Z,MEMBER,"Just an idea: what about adding a keyword to `resample()` (and maybe also to `sel()`)? Something like: ``` python ds.resample('D', by_coord='time') ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,181534708 https://github.com/pydata/xarray/issues/1041#issuecomment-252293208,https://api.github.com/repos/pydata/xarray/issues/1041,252293208,MDEyOklzc3VlQ29tbWVudDI1MjI5MzIwOA==,10050469,2016-10-07T16:07:00Z,2016-10-07T16:07:41Z,MEMBER,"> but I feel like it searches for the coordinate with the same name as the supplied dimension. Probably searching for a coordinate containing only the dimension specified in resample could do the trick. Note that this is not limited to `.resample()` but also to `.sel()`. Indexing over a non-dimension coordinate is something I also needed to do (https://groups.google.com/forum/#!searchin/xarray/fabien%7Csort:relevance/xarray/KTlG2snZabg/5V1vs3ODBAAJ). But after looking into the implementation, I understand that it's quite complicated for xarray to keep track of all possible coordinates linked to one specific dimension. And what if there are more than one coordinate? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,181534708