Pivot
Reshaping a table by turning the values of one column into new column headers, for example one row per store per month into one row per store with a column for each month.
The reverse operation, turning column headers back into rows, is called unpivoting or melting. The word also describes a spreadsheet pivot table, which summarizes the data as it reshapes it.
Where it comes up
- Wide tables that should be longValues of one variable, such as months or years, are spread across the column headers instead of being stored in a column of their own.
See also
- Wide formatA table layout in which repeated measurements of the same thing are spread across columns: one row per store, with a separate sales column for each month.
- Long formatA table layout with one row per observation, in which a repeated measurement gets a row each time: one row for each store in each month.
- Tidy dataA table layout in which each row is one observation, each column is one variable, and each cell holds one value.