Skip to content

Glossary: pandas Beyond the Basics

unstack

Also written: .unstack()

Moves the innermost index level (or a named one) into the columns, turning a long Series wide. `fill_value=0` fills missing combinations.

Where the book teaches it

Related terms

stackMultiIndexPivot table