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/1132#issuecomment-268021188,https://api.github.com/repos/pydata/xarray/issues/1132,268021188,MDEyOklzc3VlQ29tbWVudDI2ODAyMTE4OA==,1217238,2016-12-19T17:12:16Z,2016-12-19T17:12:16Z,MEMBER,"@guziy This should be fixed by #1133, which will be part of the next release.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,190683531 https://github.com/pydata/xarray/issues/1132#issuecomment-262286432,https://api.github.com/repos/pydata/xarray/issues/1132,262286432,MDEyOklzc3VlQ29tbWVudDI2MjI4NjQzMg==,1217238,2016-11-22T16:17:51Z,2016-11-22T16:17:51Z,MEMBER,"Thanks for looking into this! Based on how `factorize` works (with specialized handling for pandas dtypes), I think the most robust behavior would be to pass in a `pandas.Index`. For example, this will work better if someone uses a `pandas.PeriodIndex`. So I would suggest wrapping arrays with [`safe_cast_to_index`](https://github.com/pydata/xarray/blob/76726e58710122e302790a05ae092c30d41d3553/xarray/core/utils.py#L40) before passing them to `pd.factorize`. I'm not sure if we want a `.view` attribute on DataArrays, but in any case it's not clear that would even fix the issue here -- pandas probably needs to a coerce to numpy arrays internally in factorize eventually anyways.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,190683531 https://github.com/pydata/xarray/issues/1132#issuecomment-261979024,https://api.github.com/repos/pydata/xarray/issues/1132,261979024,MDEyOklzc3VlQ29tbWVudDI2MTk3OTAyNA==,1217238,2016-11-21T15:58:29Z,2016-11-21T15:58:29Z,MEMBER,"This looks like a plausible fix, but what would be really helpful is a minimal, complete example that triggers the error. That should help clarify the issue and at the least, we will need that for a test case in your pull request.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,190683531