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/pull/677#issuecomment-168371776,https://api.github.com/repos/pydata/xarray/issues/677,168371776,MDEyOklzc3VlQ29tbWVudDE2ODM3MTc3Ng==,5635139,2016-01-02T07:44:05Z,2016-01-02T07:44:05Z,MEMBER,"OK, there's still some improvements to make re the comments above, but that can be for the next iteration ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-168369770,https://api.github.com/repos/pydata/xarray/issues/677,168369770,MDEyOklzc3VlQ29tbWVudDE2ODM2OTc3MA==,1217238,2016-01-02T07:37:20Z,2016-01-02T07:37:20Z,MEMBER,"This is great, thanks! ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-165948468,https://api.github.com/repos/pydata/xarray/issues/677,165948468,MDEyOklzc3VlQ29tbWVudDE2NTk0ODQ2OA==,5635139,2015-12-19T05:07:20Z,2015-12-19T05:07:20Z,MEMBER,"@shoyer I made some more improvements to the docs, although they need a review ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-165943594,https://api.github.com/repos/pydata/xarray/issues/677,165943594,MDEyOklzc3VlQ29tbWVudDE2NTk0MzU5NA==,5635139,2015-12-19T03:57:41Z,2015-12-19T03:57:41Z,MEMBER,"Yes, my last comment wasn't clear. I think it's something to do with ChainMap - `dict(series)` gives the expected result, but `dict(ChainMap(series))` throws an error (actually two...). Potentially because `list(series)` gives values (but `list(df)` gives the keys)? Regardless I'll add a note in the docs for DataFrame & Panel, and the Series can wait for the moment. ``` python In [30]: series=pd.Series(pd.np.random.rand(4)) In [31]: dict(series) Out[31]: {0: 0.26874240805523286, 1: 0.3110026841777368, 2: 0.22873881434409837, 3: 0.9946345046609677} In [34]: dict(xray.core.utils.ChainMap(series)) /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/index.py:805: FutureWarning: scalar indexers for index type Int64Index should be integers and not floating point type(self).__name__),FutureWarning) --------------------------------------------------------------------------- KeyError Traceback (most recent call last) /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/series.py in __getitem__(self, key) 520 try: --> 521 result = self.index.get_value(self, key) 522 /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/index.py in get_value(self, series, key) 1591 if is_float(k) and not self.is_floating(): -> 1592 raise KeyError 1593 KeyError: During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) in () ----> 1 dict(xray.core.utils.ChainMap(series)) /Users/maximilianroos/Dropbox/workspace/xray/xray/core/utils.py in __getitem__(self, key) 310 for mapping in self.maps: 311 try: --> 312 return mapping[key] 313 except KeyError: 314 pass /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/series.py in __getitem__(self, key) 545 546 # we can try to coerce the indexer (or this will raise) --> 547 new_key = self.index._convert_scalar_indexer(key,kind='getitem') 548 if type(new_key) != type(key): 549 return self.__getitem__(new_key) /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/index.py in _convert_scalar_indexer(self, key, kind) 804 warnings.warn(""scalar indexers for index type {0} should be integers and not floating point"".format( 805 type(self).__name__),FutureWarning) --> 806 return to_int() 807 808 return key /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/index.py in to_int() 787 ikey = int(key) 788 if ikey != key: --> 789 return self._invalid_indexer('label', key) 790 return ikey 791 /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pandas/core/index.py in _invalid_indexer(self, form, key) 942 klass=type(self), 943 key=key, --> 944 kind=type(key))) 945 946 def get_duplicates(self): TypeError: cannot do label indexing on with these indexers [0.26874240805523286] of ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-165943304,https://api.github.com/repos/pydata/xarray/issues/677,165943304,MDEyOklzc3VlQ29tbWVudDE2NTk0MzMwNA==,1217238,2015-12-19T03:51:51Z,2015-12-19T03:51:51Z,MEMBER,"Ah, I understand now -- series fails your unit test. I think it still gives the expected result, though, e.g., `Dataset(Series(range(3))).equals(Dataset(dict(enumerated(range(3))))`. In any case this is probably sufficient :). ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-165943201,https://api.github.com/repos/pydata/xarray/issues/677,165943201,MDEyOklzc3VlQ29tbWVudDE2NTk0MzIwMQ==,1217238,2015-12-19T03:49:11Z,2015-12-19T03:49:11Z,MEMBER,"I imagine the rule for the Dataset constructor from pandas objects as removing one dimension. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-165943036,https://api.github.com/repos/pydata/xarray/issues/677,165943036,MDEyOklzc3VlQ29tbWVudDE2NTk0MzAzNg==,1217238,2015-12-19T03:47:29Z,2015-12-19T03:47:29Z,MEMBER,"> you have a Dataset with no coords - it's just a single value in each array in the Dataset Isn't this exactly what you would expect? Series is dict like with single elements (scalars) as values. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-165942812,https://api.github.com/repos/pydata/xarray/issues/677,165942812,MDEyOklzc3VlQ29tbWVudDE2NTk0MjgxMg==,5635139,2015-12-19T03:45:10Z,2015-12-19T03:45:10Z,MEMBER,"This doesn't work well for Series actually, because you have a Dataset with no coords - it's just a single value in each array in the Dataset. I've added a test for Panels. Let me know if you think that's sufficient, or it's worth spending more time on the Series. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-164921501,https://api.github.com/repos/pydata/xarray/issues/677,164921501,MDEyOklzc3VlQ29tbWVudDE2NDkyMTUwMQ==,5635139,2015-12-15T22:44:57Z,2015-12-15T22:44:57Z,MEMBER,"Yes - will do ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-163807686,https://api.github.com/repos/pydata/xarray/issues/677,163807686,MDEyOklzc3VlQ29tbWVudDE2MzgwNzY4Ng==,1217238,2015-12-11T01:46:53Z,2015-12-11T01:46:53Z,MEMBER,"Maybe add a test that this works on a Series? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010 https://github.com/pydata/xarray/pull/677#issuecomment-163807101,https://api.github.com/repos/pydata/xarray/issues/677,163807101,MDEyOklzc3VlQ29tbWVudDE2MzgwNzEwMQ==,5635139,2015-12-11T01:41:40Z,2015-12-11T01:41:40Z,MEMBER,"Miscreant line removed @shoyer ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,121601010