I'm new to Panda and have neen trying to do the following, using all sorts of commands and basically getting nowhere fast. I have a csv file that has 10 columns, the first 4 columns are descriptive columns and the other 6 hold numerical values. What I need to do is create a file that has the 4 descriptive columns, a new column with the title of the numerical value in it, plus the numerical values all pasted to a single column. I don't know if I've explained that well enough, but here's a visual explanation:
Existing file:
Year Type Account Group gross nett discount
1999 A ABC 1 100 80 2%
2000 B XYZ 2 1000 800 5%
New file:
Year Type Account Group Value_Type Amount
1999 A ABC 1 gross 100
1999 A ABC 1 nett 80
1999 A ABC 1 discount 2%
2000 B XYZ 2 gross 1000
2000 B XYZ 2 nett 800
2000 B XYZ 2 discount 5%
What would be the best way to achieve this?