Maximilian Roos

Results 1223 comments of Maximilian Roos

> `xr.DataArray(pandas_obj_with_multiindex, dims=...)`: I guess it should raise a warning too? I've been out of the loop of discussions recently (and less recently...). To the extent this isn't firmly decided...

Thanks @benbovy ! > More generally, maintaining the special cases for pandas multi-index has been a big hassle ever since support for it was added in Xarray. I share a...

Those are great examples! > Hmm even with the most reasonable option, extracting one or more level coordinates from a MultiIndex passed as a single variable feels too magical and...

Thank you for the very thoughtful responses. I actually think we're quite close in how we're thinking about it. I like your distinction of "Xarray Dataset as a kind of...

Excellent, this is sounding good! > * MultiIndex: the dataframe is not unstacked and the MultiIndex is added to the Dataset with all its levels as 1D coordinates of dimension...

> > was there any progress on allowing .sel to work with coords? IIRC there were some plans to allow indexes on coords beyond those named the same as a...

I see — great — I was conflating this & #8143 a bit, then. One note as I'm looking at some of my existing code which uses xarray — the...

Sorry I dropped this a while ago — I was just ramping up and lost it in my inbox. I think we were quite close to consensus, with the `unstack`...

> `xarray.Dataset.from_dataframe(df)` with no unstack would preserve the MultiIndex of `df`, i.e., wrap it in a `xarray.core.indexes.PandasMultiIndex`, create 1-d coordinates from it and then put everything in the new created...

> Well, almost :) 😅 > This may be another reason to encourage explicit construction `xr.Dataset.from_dataframe(df)` Not my most crucial point, but to the extent that `xr.Dataset.from_dataframe(df)` evaluates, it seems...