Skip to content

Commit 99734ac

Browse files
Put Examples section at the end.
1 parent 41ad4cf commit 99734ac

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

pandas/core/frame.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5173,6 +5173,20 @@ def stack(self, level=-1, dropna=True):
51735173
that are missing from the original dataframe. See Examples
51745174
section.
51755175
5176+
Returns
5177+
-------
5178+
DataFrame or Series
5179+
Stacked dataframe or series.
5180+
5181+
See Also
5182+
--------
5183+
DataFrame.unstack: unstack prescribed level(s) from index axis
5184+
onto column axis.
5185+
DataFrame.pivot: reshape dataframe from long format to wide
5186+
format.
5187+
DataFrame.pivot_table: create a spreadsheet-style pivot table
5188+
as a DataFrame.
5189+
51765190
Notes
51775191
-----
51785192
The function is named by analogy with a stack of books
@@ -5276,20 +5290,6 @@ def stack(self, level=-1, dropna=True):
52765290
one b NaN 1.0
52775291
two a 2.0 NaN
52785292
b NaN 3.0
5279-
5280-
Returns
5281-
-------
5282-
DataFrame or Series
5283-
Stacked dataframe or series.
5284-
5285-
See Also
5286-
--------
5287-
DataFrame.unstack: unstack prescribed level(s) from index axis
5288-
onto column axis.
5289-
DataFrame.pivot: reshape dataframe from long format to wide
5290-
format.
5291-
DataFrame.pivot_table: create a spreadsheet-style pivot table
5292-
as a DataFrame.
52935293
"""
52945294
from pandas.core.reshape.reshape import stack, stack_multiple
52955295

0 commit comments

Comments
 (0)