I have the below xarray Dataset. Now, I'd like to combine Fender_1, Fender_2, and Fender_3 variables into a single variable called "data" with the dimension "fender_name". Such that I can simply call the variable "data" and select which fender I want using data.sel(fender_name = ...)
How can I achieve this?
One way to do this would be to use Dataset.to_array
:
data = ds[["Fender_1", "Fender_2", "Fender_3"]].to_array(dim="fender_name")