The unstack operation is the inverse of stack, reshaping a long-format dataset into a wide-format dataset.

Example

Dataset:

CountryAttributeValue
USAPopulation330000000
USAGDP21000000
ChinaPopulation1400000000
ChinaGDP15000000
IndiaPopulation1350000000
IndiaGDP3000000

Unstack the dataset:

CountryPopulationGDP
USA33000000021000000
China140000000015000000
India13500000003000000