Skip to content

pandasx / stack

Function: stack() ​

stack(df, options?): DataFrame | Series

Defined in: src/levels.ts:55

Moves column level(s) into the innermost row index level. Flat columns give a Series; MultiIndex columns give a frame with the remaining column levels. Like pandas 3, missing combinations are kept as NA unless dropna.

Parameters ​

ParameterType
dfDataFrame
options{ dropna?: boolean; level?: Level; }
options.dropna?boolean
options.level?Level

Returns ​

DataFrame | Series

Released under the MIT License.