issues: 834273555
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
834273555 | MDU6SXNzdWU4MzQyNzM1NTU= | 5048 | Ability to rename items inside a coordinate, matching pandas rename() functionality | 9399446 | closed | 0 | 6 | 2021-03-18T00:15:04Z | 2022-04-18T15:52:31Z | 2022-04-18T15:52:30Z | NONE | I have by necessity been converting a bunch of code that used pandas Panels to xarray, but I seem to have hit the fact that the xarray "renaming" functionality is not, in fact, related at all to the pandas "rename," and there appears to be no functionality for the latter in xarray. Describe the solution you'd like I want to be able to rename specific items inside of a coordinate, which for 2D DataArrays is analogous to renaming a column in a pandas DataFrame. For example, let's say I have the following DataArray in variable Let's pretend that the 'dd' should be 'd' and is a typo from something outside of my control. If that were a Pandas DataFrame, I could just do
I found this issue #4825 on renaming/resetting/setting, etc. but everything listed there deals with the whole coordinate, not the innards of one. The only thing I've found that allows what I want to do is It's exceedingly cumbersome. If there is already a way to do this and I'm just missing it, please just let me know and I will be super happy to go off and eat my crow and use the existing method. If not, I think this is actually a really important functionality. It may even be a deal-breaker for me ... I have to rename columns a LOT. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/5048/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |