Skip to content

Explode an xarray Dataset coordinate into variables #8676

Answered by dcherian
paw-lu asked this question in Q&A
Discussion options

You must be logged in to vote

How about https://docs.xarray.dev/en/stable/generated/xarray.DataArray.to_dataset.html

xr.merge([ds["e"], ds["coefficients"].to_dataset(dim="coefficients_dim_0")])

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@paw-lu
Comment options

Answer selected by paw-lu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants