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/1270#issuecomment-280680476,https://api.github.com/repos/pydata/xarray/issues/1270,280680476,MDEyOklzc3VlQ29tbWVudDI4MDY4MDQ3Ng==,10050469,2017-02-17T15:29:30Z,2017-02-17T15:29:30Z,MEMBER,"Maybe related? Selection with slices also doesn't work:
```python
da = xr.DataArray(pd.Series(1, pd.period_range('1990-1', '2000-12', freq='M')))
da.sel(dim_0='1991-07') # works fine
da.sel(dim_0='1992-02') # works fine
da.sel(dim_0=slice('1991-07', '1992-02'))
```
Throws:
```
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
in ()
2 da.sel(dim_0='1991-07') # works fine
3 da.sel(dim_0='1992-02') # works fine
----> 4 da.sel(dim_0=slice('1991-07', '1992-02'))
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/xarray/core/dataarray.py in sel(self, method, tolerance, drop, **indexers)
668 """"""
669 pos_indexers, new_indexes = indexing.remap_label_indexers(
--> 670 self, indexers, method=method, tolerance=tolerance
671 )
672 result = self.isel(drop=drop, **pos_indexers)
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/xarray/core/indexing.py in remap_label_indexers(data_obj, indexers, method, tolerance)
286 else:
287 idxr, new_idx = convert_label_indexer(index, label,
--> 288 dim, method, tolerance)
289 pos_indexers[dim] = idxr
290 if new_idx is not None:
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/xarray/core/indexing.py in convert_label_indexer(index, label, index_name, method, tolerance)
183 indexer = index.slice_indexer(_try_get_item(label.start),
184 _try_get_item(label.stop),
--> 185 _try_get_item(label.step))
186 if not isinstance(indexer, slice):
187 # unlike pandas, in xarray we never want to silently convert a slice
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/pandas/indexes/base.py in slice_indexer(self, start, end, step, kind)
2995 """"""
2996 start_slice, end_slice = self.slice_locs(start, end, step=step,
-> 2997 kind=kind)
2998
2999 # return a slice
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/pandas/indexes/base.py in slice_locs(self, start, end, step, kind)
3174 start_slice = None
3175 if start is not None:
-> 3176 start_slice = self.get_slice_bound(start, 'left', kind)
3177 if start_slice is None:
3178 start_slice = 0
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/pandas/indexes/base.py in get_slice_bound(self, label, side, kind)
3113 # For datetime indices label may be a string that has to be converted
3114 # to datetime boundary according to its resolution.
-> 3115 label = self._maybe_cast_slice_bound(label, side, kind)
3116
3117 # we need to look up the label
/home/mowglie/.pyvirtualenvs/py3/lib/python3.5/site-packages/pandas/tseries/period.py in _maybe_cast_slice_bound(self, label, side, kind)
838
839 """"""
--> 840 assert kind in ['ix', 'loc', 'getitem']
841
842 if isinstance(label, datetime):
AssertionError:
```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207862981
https://github.com/pydata/xarray/issues/1270#issuecomment-280072442,https://api.github.com/repos/pydata/xarray/issues/1270,280072442,MDEyOklzc3VlQ29tbWVudDI4MDA3MjQ0Mg==,10050469,2017-02-15T17:07:22Z,2017-02-15T17:07:22Z,MEMBER,I thought this was one of the motivations behind NetCDFTimeIndex : https://github.com/pydata/xarray/pull/1252,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,207862981