Suppose you had data on the monthly production at 5 different factories. There are two fundamental ways to store these data.
First is “long.” The long data will have many rows and three columns: month, factory, and production. To see the production at factory 3 in May 2020, you find the row where month=”May 2020″ and factory=3, then read the value in the production column.
Second is “wide.” The wide data will have just 1 row but many columns. Each column will be labeled something like “Factory X month M”. To see production at factory 3 in May 2020, you find the column labeled “Factory 3 month May 2020” and read the value below.
Both wide and long data are useful in different contexts, and people who do a lot of work with data regularly need to switch between them. So all modern data environments have built-in commands to make it happen. In Excel, this is the “pivot table,” so named because you’re literally “pivoting” the data from a long orientation to a wide orientation or vice-versa.
Latest Answers