AI engineering glossary · NumPy pandas visualization

What is melt?

melt (also called wide to long): A pandas function that reshapes a wide table, with one column per measurement, into a long table with one row per measurement. The old column names go into a single variable column and their values into a value column. Plotting and modelling tools often need this long form.

Level: intermediateTopic: NumPy pandas visualization

melt: an example

Melting columns jan, feb and mar into month and sales columns turns a 100-row wide table into 300 long rows.

Related terms

More NumPy pandas visualization terms

Where you learn it

melt is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.