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/3153#issuecomment-520183833,https://api.github.com/repos/pydata/xarray/issues/3153,520183833,MDEyOklzc3VlQ29tbWVudDUyMDE4MzgzMw==,1217238,2019-08-10T22:24:31Z,2019-08-10T22:24:31Z,MEMBER,thanks @HasanAhmadQ7 !,"{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,470712573
https://github.com/pydata/xarray/pull/3153#issuecomment-520182982,https://api.github.com/repos/pydata/xarray/issues/3153,520182982,MDEyOklzc3VlQ29tbWVudDUyMDE4Mjk4Mg==,1217238,2019-08-10T22:06:46Z,2019-08-10T22:06:46Z,MEMBER,I'm going to merge this shortly assuming tests pass...,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,470712573
https://github.com/pydata/xarray/pull/3153#issuecomment-518045169,https://api.github.com/repos/pydata/xarray/issues/3153,518045169,MDEyOklzc3VlQ29tbWVudDUxODA0NTE2OQ==,1217238,2019-08-04T23:33:45Z,2019-08-04T23:33:45Z,MEMBER,"> A fix in pandas that I can imagine is to modify the pd.Index to retain the dtype similar to the PandasIndexAdapter in xarray/core/indexing. However, it seems to me that their design it to coerce any float to float64, so I did not feel they would consider this to be a bug. I would try to dig into such solution more if you recommend so.
Yes, after thinking a little bit more about this I think you're totally right.
Pandas only has `Float64Index`. When xarray makes an index for float32 data, we use a Float64Index under the hood for look-ups, but the fact that index represents float32 data is only known to xarray, not pandas.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,470712573
https://github.com/pydata/xarray/pull/3153#issuecomment-515845749,https://api.github.com/repos/pydata/xarray/issues/3153,515845749,MDEyOklzc3VlQ29tbWVudDUxNTg0NTc0OQ==,1217238,2019-07-29T05:04:24Z,2019-07-29T05:04:24Z,MEMBER,"@HasanAhmadQ7 thanks for looking into this!
I think this could be solved a little more cleanly at a lower level of xarray's indexing logic. In particular, all of our indexing calls go through [`convert_label_indexer`](https://github.com/pydata/xarray/blob/1d7bcbdc75b6d556c04e2c7d7a042e4379e15303/xarray/core/indexing.py#L121), which in turn uses `get_loc` and `get_indexer_nd` helper functions to wrap the calls into `pandas.Index` methods:
https://github.com/pydata/xarray/blob/1d7bcbdc75b6d556c04e2c7d7a042e4379e15303/xarray/core/indexing.py#L106-L118
These helper function would be a good place to implement this casting logic -- and you might even consider trying to fix it upstream in pandas as well.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,470712573