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/4727#issuecomment-750926206,https://api.github.com/repos/pydata/xarray/issues/4727,750926206,MDEyOklzc3VlQ29tbWVudDc1MDkyNjIwNg==,10194086,2020-12-24T16:51:42Z,2020-12-24T19:28:23Z,MEMBER,"There seems to be a subtle difference between comparing `Dataset` and `DataArray`.
`DataArray` compares `coords`:
https://github.com/pydata/xarray/blob/03d8d56c9b6d090f0de2475202368b08435eaeb5/xarray/core/dataarray.py#L2792
while `Dataset` compares `_variables`:
https://github.com/pydata/xarray/blob/03d8d56c9b6d090f0de2475202368b08435eaeb5/xarray/core/dataset.py#L1457-L1459
Thus once we compare `xarray.core.variable.IndexVariable` and once we compare `xarray.core.dataarray.DataArray` and the comparison takes different code paths...
```python
import xarray as xr
air = xr.tutorial.open_dataset(""air_temperature"")
type(air._variables[""lat""])
# xarray.core.variable.IndexVariable
type(air.air.coords[""lat""])
# xarray.core.dataarray.DataArray
```
---
edit: typo
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,773750763