I am a Python (2.75) neophyte and need to reformat a large data file. A sample is below:
P1 01 01 1991 100.00
P1 01 01 1992 111.30
P1 01 01 1993 97.58
I1 01 01 1991 0.0
I1 01 01 1992 20.0
I1 01 01 1993 32.4
I need each new value in the first column to become a row with the remaining duplicates removed and with a space between each group:
NAME P1
01 01 1991 100.00 1.81 14.34 0.0
01 01 1992 111.30 2.34 31.65 0.0
01 01 1993 97.58 2.93 38.16 0.0
NAME I1
01 01 1991 0.0 0.0 0.0 101.5
01 01 1992 0.0 0.0 0.0 112.2
01 01 1993 0.0 0.0 0.0 687.3
I know how to pop out a column but this is beyond my current skills. Thanks for any help.