# Wide to Long with melt

A wide table keeps one kind of value in many columns, a column per quiz, which reads well but is hard to filter and group, and melt turns it into a long table with one row per value, named with id_vars, var_name and value_name, the shape textbooks call tidy data.

![Cheat sheet: Wide to Long with melt](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/1800befdc9314a93bbee3654161b63b7.webp)

- Category: Data Analysis
- Level: Journeyman
- Tags: Long Format, melt(), python, Tidy Data, Wide Format
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/pandas-melt-cheat-sheet
