Skip to content

Commit 5e2f1dc

Browse files
authored
Add "see also" in to_dataframe docs (#5978)
1 parent efe3b1b commit 5e2f1dc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

xarray/core/dataarray.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,9 +2726,11 @@ def to_dataframe(
27262726
"""Convert this array and its coordinates into a tidy pandas.DataFrame.
27272727
27282728
The DataFrame is indexed by the Cartesian product of index coordinates
2729-
(in the form of a :py:class:`pandas.MultiIndex`).
2729+
(in the form of a :py:class:`pandas.MultiIndex`). Other coordinates are
2730+
included as columns in the DataFrame.
27302731
2731-
Other coordinates are included as columns in the DataFrame.
2732+
For 1D and 2D DataArrays, see also :py:func:`DataArray.to_pandas` which
2733+
doesn't rely on a MultiIndex to build the DataFrame.
27322734
27332735
Parameters
27342736
----------
@@ -2750,6 +2752,9 @@ def to_dataframe(
27502752
result
27512753
DataArray as a pandas DataFrame.
27522754
2755+
See also
2756+
--------
2757+
DataArray.to_pandas
27532758
"""
27542759
if name is None:
27552760
name = self.name

0 commit comments

Comments
 (0)