Skip to content

Glossary: pandas Beyond the Basics

melt

Also written: .melt()

Turns a wide table into a long one by moving column names into the values of one column. `id_vars=` columns stay as they are, and `var_name=` and `value_name=` name the two new columns.

Where the book teaches it

Related terms

Wide dataLong datapivot