Skip to content

Commit c919739

Browse files
Update documentation for clarity (#8817)
* Update documentation in dataset.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c6e0935 commit c919739

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xarray/core/dataset.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7266,10 +7266,11 @@ def from_dataframe(cls, dataframe: pd.DataFrame, sparse: bool = False) -> Self:
72667266
Each column will be converted into an independent variable in the
72677267
Dataset. If the dataframe's index is a MultiIndex, it will be expanded
72687268
into a tensor product of one-dimensional indices (filling in missing
7269-
values with NaN). This method will produce a Dataset very similar to
7269+
values with NaN). If you rather preserve the MultiIndex use
7270+
`xr.Dataset(df)`. This method will produce a Dataset very similar to
72707271
that on which the 'to_dataframe' method was called, except with
72717272
possibly redundant dimensions (since all dataset variables will have
7272-
the same dimensionality)
7273+
the same dimensionality).
72737274
72747275
Parameters
72757276
----------

0 commit comments

Comments
 (0)