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/6377#issuecomment-1085245244,https://api.github.com/repos/pydata/xarray/issues/6377,1085245244,IC_kwDOAMm_X85Ar4c8,9399446,2022-03-31T23:57:35Z,2022-03-31T23:57:35Z,NONE,"@Huite Indeed, you are right that working with a coordinate is easy if it works for DataArrays ... this is a good example of my pandas-oriented brain not quite being used to xarray just yet (though I do love it).
Regarding signature options for a Dataset ... given the two examples you state, I also personally prefer the look of the second one. However, the first one can be extremely useful for more complicated replacement needs because the input dict can be assembled *programmatically* prior to the replace call, for doing replaces in several subset DataArrays. I think the second version would require looping of some sort, or multiple calls at the very least. For me, in my context of renaming on coordinates (the index or columns in a DataFrame context), I often have to modify many things in both axes, which I do using one dictionary.
I suppose it's a matter of preference and of ease of implementation ... since I'm not the one doing the coding, I shall definitely defer to others on the latter point!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1173497454
https://github.com/pydata/xarray/issues/6377#issuecomment-1083385035,https://api.github.com/repos/pydata/xarray/issues/6377,1083385035,IC_kwDOAMm_X85AkyTL,9399446,2022-03-30T16:54:18Z,2022-03-30T16:54:18Z,NONE,"Thanks @dcherian for linking the other issue because that led me here. I'm all for this! Though I would like to add the consideration for doing this replacement in a coordinate, not just the data (parts of the suggested code like returning `da.copy(data=out.reshape(da.shape))` won't work for that). Once they are accessed coordinates work very much like the data part, so hopefully making this general shouldn't be too hard?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1173497454
https://github.com/pydata/xarray/issues/5048#issuecomment-804297243,https://api.github.com/repos/pydata/xarray/issues/5048,804297243,MDEyOklzc3VlQ29tbWVudDgwNDI5NzI0Mw==,9399446,2021-03-22T18:32:55Z,2021-03-22T18:32:55Z,NONE,"@andersy005 's method definitely works, and I can iterate to do it for multiple names, so I've already gone away happy. A dedicated method would be nice though :).
""rename"" is understandably overloaded ... would something like ""update_coords"" be workable? It sort of matches the existing ""assign_coords"".
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,834273555
https://github.com/pydata/xarray/issues/5048#issuecomment-801530191,https://api.github.com/repos/pydata/xarray/issues/5048,801530191,MDEyOklzc3VlQ29tbWVudDgwMTUzMDE5MQ==,9399446,2021-03-18T00:35:13Z,2021-03-18T00:50:12Z,NONE,"I have not ... that does work! Do you have a nice way to do that for a whole set? I only used one here, but I'm typically renaming something like 5-8 at a time, so ""rdict"" would be much bigger.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,834273555