Hi everyone, I have a large dataset 74,000 rows (customers) x 4,700 variables (supplier info) that looks roughly like below. Each row represents a unique customer, and the columns include data on customer financials and the top-10 suppliers' financials:
and I would like to translate it into a panel data set, where Cols 1 and 2 identify unique customer-years:
Is there any quick what I can do this? Any help at all would be appreciated.
Thanks,
Panos
Cust | CustTA 2008 | CustTA 2007 | Supp1 | Supp1TA 2008 | Supp1TA 2007 | Supp2 | Supp2TA 2008 | Supp2TA 2007 | Supp3 | Supp3TA 2008 | Supp3TA 2007 |
00001 | a | b | 02222 | c | d | 03333 | e | f | 04444 | g | h |
00002 | i | j | 05555 | k | l | 04444 | m | n | 06666 | o | p |
and I would like to translate it into a panel data set, where Cols 1 and 2 identify unique customer-years:
Cust | Year | Cust TA | Supp1 | Supp1TA | Supp2 | Supp2TA | Supp3 | Supp3TA |
00001 | 2008 | a | 02222 | c | 03333 | e | 04444 | g |
00001 | 2007 | b | 02222 | d | 03333 | f | 04444 | h |
00002 | 2008 | i | 05555 | k | 04444 | m | 06666 | o |
00002 | 2007 | j | 05555 | l | 04444 | n | 06666 | p |
Is there any quick what I can do this? Any help at all would be appreciated.
Thanks,
Panos
Comment