I have data that looks like this:
| Date | Country | Channel | App-Purchase-Laptop | App-Purchase-Cell | App-Sell-Laptop | App-Sell-Cell | Web-Purchase-Laptop | Web-Purchase-Cell | Web-Sell-Laptop | Web-Sell-Cell |
|---|---|---|---|---|---|---|---|---|---|---|
| 03/25 | US | 6 | 10 | 30 | 40 | 5 | 7 | 9 | 11 | |
| 03/25 | US | Direct | 1 | 30 | 10 | 20 | 6 | 8 | 10 | 12 |
| 03/25 | India | 4 | 60 | 29 | 37 | 40 | 21 | 43 | 53 | |
| 03/25 | India | Direct | 11 | 16 | 32 | 22 | 39 | 11 | 7 | 45 |
| 03/26 | US | 6 | 10 | 30 | 40 | 5 | 7 | 9 | 11 | |
| 03/26 | US | Direct | 1 | 30 | 10 | 20 | 6 | 8 | 10 | 12 |
| 03/26 | India | 4 | 60 | 29 | 37 | 40 | 21 | 43 | 53 | |
| 03/26 | India | Direct | 11 | 16 | 32 | 22 | 39 | 11 | 7 | 45 |
Output I am looking for:
| Date | Country | Channel | Category | Source | Purchase | Sell |
|---|---|---|---|---|---|---|
| 03/25 | US | App | Laptop | 6 | 30 | |
| 03/25 | US | App | Cell | 10 | 40 | |
| 03/25 | US | Web | Laptop | 5 | 9 | |
| 03/25 | US | Web | Cell | 7 | 11 | |
| 03/25 | US | Direct | App | Laptop | 1 | 10 |
| 03/25 | US | Direct | App | Cell | 30 | 20 |
| 03/25 | US | Direct | Web | Laptop | 6 | 10 |
| 03/25 | US | Direct | Web | Cell | 8 | 12 |
| 03/25 | India | App | Laptop | 4 | 30 | |
| 03/25 | India | App | Cell | 60 | 29 | |
| 03/25 | India | Web | Laptop | 40 | 43 | |
| 03/25 | India | Web | Cell | 21 | 53 | |
| 03/25 | India | Direct | App | Laptop | 11 | 32 |
| 03/25 | India | Direct | App | Cell | 16 | 22 |
| 03/25 | India | Direct | Web | Laptop | 39 | 7 |
| 03/25 | India | Direct | Web | Cell | 11 | 45 |
| 03/26 | US | App | Laptop | 6 | 30 | |
| 03/26 | US | App | Cell | 10 | 40 | |
| 03/26 | US | Web | Laptop | 5 | 9 | |
| 03/26 | US | Web | Cell | 7 | 11 | |
| 03/26 | US | Direct | App | Laptop | 1 | 10 |
| 03/26 | US | Direct | App | Cell | 30 | 20 |
| 03/26 | US | Direct | Web | Laptop | 6 | 10 |
| 03/26 | US | Direct | Web | Cell | 8 | 12 |
| 03/26 | India | App | Laptop | 4 | 30 | |
| 03/26 | India | App | Cell | 60 | 29 | |
| 03/26 | India | Web | Laptop | 40 | 43 | |
| 03/26 | India | Web | Cell | 21 | 53 | |
| 03/26 | India | Direct | App | Laptop | 11 | 32 |
| 03/26 | India | Direct | App | Cell | 16 | 22 |
| 03/26 | India | Direct | Web | Laptop | 39 | 7 |
| 03/26 | India | Direct | Web | Cell | 11 | 45 |
I tried different ways to solve this using melt, but I have been unable to solve this since I am new to python. Your help will be appreciated. Thanks!