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/1565#issuecomment-329177780,https://api.github.com/repos/pydata/xarray/issues/1565,329177780,MDEyOklzc3VlQ29tbWVudDMyOTE3Nzc4MA==,10050469,2017-09-13T14:03:06Z,2017-09-13T14:03:06Z,MEMBER,"> Potentially we could some sort of API for surfacing this information, e.g., a pandas_dtype property to xarray.Variable. It's probably cleaner, because the dtype of PeriodIndex can be several things, i.e. ``'period[M]'`` in my case.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,256496917 https://github.com/pydata/xarray/issues/1565#issuecomment-328637548,https://api.github.com/repos/pydata/xarray/issues/1565,328637548,MDEyOklzc3VlQ29tbWVudDMyODYzNzU0OA==,10050469,2017-09-11T19:43:19Z,2017-09-11T19:43:19Z,MEMBER,"OK, so the problem is that when given to ``is_datetime_like`` [here](https://github.com/pydata/xarray/blob/5472fb585b9bfda7b0ce5b54d0182d608199df35/xarray/core/dataset.py#L81), the ``pd.PeriodIndex`` is already transformed into an array of dtype ``object``. Before @darothen 's https://github.com/pydata/xarray/pull/1356, the piece if code that was executed is ``date = ref_var.to_index()``, which has the nice property to return a ``PeriodIndex``, as shown here from my debugger: ```python >>> ref_var Out[1]: array([Period('2000-01', 'M'), Period('2000-02', 'M'), Period('2000-03', 'M'), Period('2000-04', 'M'), Period('2000-05', 'M'), Period('2000-06', 'M'), Period('2000-07', 'M'), Period('2000-08', 'M'), Period('2000-09', 'M'), Period('2000-10', 'M'), Period('2000-11', 'M'), Period('2000-12', 'M')], dtype=object) >>> ref_var.to_index() Out[3]: PeriodIndex(['2000-01', '2000-02', '2000-03', '2000-04', '2000-05', '2000-06', '2000-07', '2000-08', '2000-09', '2000-10', '2000-11', '2000-12'], dtype='period[M]', name='time', freq='M') ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,256496917 https://github.com/pydata/xarray/issues/1565#issuecomment-328575741,https://api.github.com/repos/pydata/xarray/issues/1565,328575741,MDEyOklzc3VlQ29tbWVudDMyODU3NTc0MQ==,10050469,2017-09-11T16:00:43Z,2017-09-11T16:00:43Z,MEMBER,Indeed! Will look into it.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,256496917 https://github.com/pydata/xarray/issues/1565#issuecomment-328469339,https://api.github.com/repos/pydata/xarray/issues/1565,328469339,MDEyOklzc3VlQ29tbWVudDMyODQ2OTMzOQ==,10050469,2017-09-11T09:13:21Z,2017-09-11T09:13:21Z,MEMBER,"I was wondering which PR was responsible for the regression, but I guess I don't understand the internals well enough to classify this as ""easy fix"" for me ;)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,256496917