Benoit Bovy
Benoit Bovy
> What's the rationale for deprecating this? I think my experience with users of xarray is mostly those coming from pandas; for them interop is quite important. Yes I agree...
> How would we handle creating xarray objects from pandas objects where they have a multiindex? For `pandas.Series` / `pandas.DataFrame` objects, `DataArray.from_series()` / `Dataset.from_dataframe()` already expand multi-index levels as dimensions....
I'm thinking of only accepting one or more instances of [Indexes](https://github.com/pydata/xarray/blob/e678a1d7884a3c24dba22d41b2eef5d7fe5258e7/xarray/core/indexes.py#L1030) as `indexes` argument in the Dataset and DataArray constructors. The only exception is when `fastpath=True` a mapping can be...
Thanks for the report @znichollscr. Maybe we should check `pandas.MultiIndex.is_unique` in `Dataset.unstack()` like in `Dataset.from_dataframe()`? ```python df = ds.drop_vars("lat").to_dataframe() xr.Dataset.from_dataframe(df) # ValueError: cannot convert a DataFrame with a non-unique MultiIndex...
> Maybe we should check `pandas.MultiIndex.is_unique` in `Dataset.unstack()` Better to check this in `PandasMultiIndex.unstack()` actually.
Following thoughts and discussions in various issues (e.g., #6836), I'd like to suggest another section to the ones in the top comment: ## Deprecate `pandas.MultiIndex` special cases in Xarray -...
xref #6904 (not sure it is 100% relevant, but the problem also arises when `.sel` is called within some parallel workflow).
> How exactly does it work with the automatic types in the docstring? Yes, what I really like in the html API documentation is the types (and especially the hyperlinks!)...
I have the exact same applications than yours @tippetts, but I also would like to write netCDF files that are compatible with other tools than just xarray. With the category...
> unless we want options for controlling how the MultiIndex is stored. Yes that's what I mean, something like `categories_codes`, `raw_values` and/or `hybrid` options, though I don't know if using...