diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index bdb881278eb..b4c00b66ed8 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -7266,10 +7266,11 @@ def from_dataframe(cls, dataframe: pd.DataFrame, sparse: bool = False) -> Self: Each column will be converted into an independent variable in the Dataset. If the dataframe's index is a MultiIndex, it will be expanded into a tensor product of one-dimensional indices (filling in missing - values with NaN). This method will produce a Dataset very similar to + values with NaN). If you rather preserve the MultiIndex use + `xr.Dataset(df)`. This method will produce a Dataset very similar to that on which the 'to_dataframe' method was called, except with possibly redundant dimensions (since all dataset variables will have - the same dimensionality) + the same dimensionality). Parameters ----------