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/5985#issuecomment-1473820156,https://api.github.com/repos/pydata/xarray/issues/5985,1473820156,IC_kwDOAMm_X85X2LX8,43316012,2023-03-17T13:09:02Z,2023-03-17T13:10:06Z,COLLABORATOR,"Found as an answer to a proposal PR: https://github.com/pydata/xarray/pull/7628#discussion_r1140211918 The solution is to use `.str.format` the other way around as you propose: You can try `das.str.format(da)`. Maybe you need to use `{}` instead of `%` in your format array.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052753606 https://github.com/pydata/xarray/issues/5985#issuecomment-1466374343,https://api.github.com/repos/pydata/xarray/issues/5985,1466374343,IC_kwDOAMm_X85XZxjH,10194086,2023-03-13T15:32:45Z,2023-03-13T15:32:45Z,MEMBER,I probably got this from a pandas issue/ pull request - but I can't remember where exactly - sorry...,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052753606 https://github.com/pydata/xarray/issues/5985#issuecomment-1462537234,https://api.github.com/repos/pydata/xarray/issues/5985,1462537234,IC_kwDOAMm_X85XLIwS,15331990,2023-03-09T18:08:10Z,2023-03-09T18:08:10Z,CONTRIBUTOR,Thanks for following up! It's been a while so I don't remember; feel free to disregard what I said.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052753606 https://github.com/pydata/xarray/issues/5985#issuecomment-1462493521,https://api.github.com/repos/pydata/xarray/issues/5985,1462493521,IC_kwDOAMm_X85XK-FR,35968931,2023-03-09T17:47:58Z,2023-03-09T17:47:58Z,MEMBER,"Hi @alrho007 - thanks for your interest in contributing to xarray! The code for the string accessor is in `xarray/core/accessor_str.py`. That's where you would need to make changes. > The idea would be to wrap xr.DataArray.str.__mod__ in xr.DataArray.str.format. @mathause could you expand on what you mean exactly? I'm new to this part of the codebase. There is already a `.format` method, are you talking about changing its behaviour? > xr.DataArray([0, 1, 2]).str would raise an error right since it's int type? Also @ahuang11 this seems fine? Because the `.str` accessor doesn't actually perform a check that the passed data is a `str` type immediately?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052753606 https://github.com/pydata/xarray/issues/5985#issuecomment-1461552218,https://api.github.com/repos/pydata/xarray/issues/5985,1461552218,IC_kwDOAMm_X85XHYRa,61923007,2023-03-09T08:27:23Z,2023-03-09T08:31:14Z,NONE,"Hi @TomNicholas , how do I contribute to this as an outreachy intern?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052753606 https://github.com/pydata/xarray/issues/5985#issuecomment-969794751,https://api.github.com/repos/pydata/xarray/issues/5985,969794751,IC_kwDOAMm_X845zeS_,15331990,2021-11-16T03:27:20Z,2021-11-16T03:27:20Z,CONTRIBUTOR,"Actually would xr.DataArray.str.format work? e.g. `xr.DataArray([0, 1, 2]).str` would raise an error right since it's int type?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052753606 https://github.com/pydata/xarray/issues/5985#issuecomment-968908702,https://api.github.com/repos/pydata/xarray/issues/5985,968908702,IC_kwDOAMm_X845wF-e,10194086,2021-11-15T13:25:56Z,2021-11-15T13:25:56Z,MEMBER,I think that sounds sensible. The idea would be to wrap `xr.DataArray.str.__mod__` in `xr.DataArray.str.format`. Are you interested in providing a PR?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052753606