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 2189750364,PR_kwDOAMm_X85p0Epw,8847,pandas 3 MultiIndex fixes,2448579,closed,0,,,0,2024-03-16T03:51:06Z,2024-03-20T15:00:20Z,2024-03-20T15:00:18Z,MEMBER,,0,pydata/xarray/pulls/8847,"xref #8844 Closes https://github.com/xarray-contrib/flox/issues/342","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8847/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 2189738090,PR_kwDOAMm_X85p0CKq,8846,Support pandas copy-on-write behaviour,2448579,closed,0,,,2,2024-03-16T03:14:46Z,2024-03-18T16:00:15Z,2024-03-18T16:00:12Z,MEMBER,,0,pydata/xarray/pulls/8846,"- [x] Closes #8843 - [x] Tests added ```python import numpy as np import pandas as pd pd.set_option(""mode.copy_on_write"", True) from xarray.core.variable import _possibly_convert_objects string_var = np.array([""a"", ""bc"", ""def""], dtype=object) datetime_var = np.array( [""2019-01-01"", ""2019-01-02"", ""2019-01-03""], dtype=""datetime64[ns]"" ) assert _possibly_convert_objects(string_var).flags.writeable assert _possibly_convert_objects(datetime_var).flags.writeable ``` The core issue is that we now get read-only arrays back from pandas here: https://github.com/pydata/xarray/blob/fbcac7611bf9a16750678f93483d3dbe0e261a0a/xarray/core/variable.py#L197-L212 @phofl is this expected?","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8846/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull