Skip to content

Glossary: pandas Beyond the Basics

stack

Also written: .stack()

Moves column labels into the innermost index level, making a table longer. It is the reverse of `unstack`.

Where the book teaches it

Related terms

unstackMultiIndex