Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the to Convert Varibales to Dimensions #31

Closed
dzelge opened this issue Feb 22, 2019 · 0 comments
Closed

Add the to Convert Varibales to Dimensions #31

dzelge opened this issue Feb 22, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dzelge
Copy link
Contributor

dzelge commented Feb 22, 2019

Is your feature request related to a problem? Please describe.

We need the ability to convert a dataset variable into a dimension as requested by Norman.

Describe the solution you'd like

Something like this:

ds2 = xr.concat([ds[var_name] for var_name in ds.data_vars], "var")
var_coords=xr.DataArray([var_name for var_name in ds.data_vars], dims=["var"])
ds2.assign_coords(var=var_coords)
@dzelge dzelge added enhancement New feature or request in progress The assignee is working on it labels Feb 22, 2019
@dzelge dzelge self-assigned this Feb 22, 2019
@forman forman closed this as completed Apr 26, 2019
@forman forman removed the in progress The assignee is working on it label Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants