Skip to content

Commit

Permalink
Update documentation for clarity (#8817)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
staadecker and pre-commit-ci[bot] authored Mar 9, 2024
1 parent c6e0935 commit c919739
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down

0 comments on commit c919739

Please sign in to comment.