diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 5d10a5541f556..8fb400872378c 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -9288,10 +9288,9 @@ def stack( DataFrame. The new inner-most levels are created by pivoting the columns of the current dataframe: - - if the columns have a single level, the output is a Series; - - if the columns have multiple levels, the new index - level(s) is (are) taken from the prescribed level(s) and - the output is a DataFrame. + - if the columns have a single level, the output is a Series; + - if the columns have multiple levels, the new index level(s) is (are) + taken from the prescribed level(s) and the output is a DataFrame. Parameters ----------