Skip to main content
Melt goes from wide to long: several value columns collapse into two — one holding the former column names, one holding the values. It is the inverse of Unstack (Long to Wide), which is where the shared long-versus-wide diagram lives.

Configuration

Define:
  • The name of the column that will host the former column names — the tickers, in the example below.
  • The name of the column that will hold the values.
  • Which columns should be melted. Uncheck the ones that should stay as columns.
Configuring the Wide to Long step
The result carries one row per combination of the retained entities and the melted variable:
The resulting long-format dataset
Long format is usually what you want before Regroup entities or before publishing a dataset that other people will filter by entity.

Next steps

Unstack (Long to Wide)

The inverse operation, with the full worked example.

Regroup entities

Aggregate once the data is in long format.