I have a data set with 5 columns. The first 2 columns are identifiers and the last 3 columns are properties. I need to convert the data so that I have 2 identifiers on each row. Then I want to put the name of each property on one row along with the value of that property. So along with the name of column 3 as column 3 and value of column 4 as column 4. The next row of data will be the first 2 columns of the data set plus the name of column 4 as column 3 and the value of column 4 as column 4.
Example data:
What I have is:
FirstName LastName Height Weight HairColor
Bob Smith 6'0" 200 Brown
Mary Jones 5'6" 120 Blond
What I need is:
FirstName LastName PropertyName PropertyValue
Bob Smith Height 6'0"
Bob Smith Weight 200
Bob Smith HairColor Brown
Mary Jones Height 5'6"
Mary Jones Weight 120
Mary Jones HairColor Blond
Does anyone have any ideas on how to do this? Many thanks for your help. My actual files might have 4 - 6 columns of identifiers, up to 100 rows of properties and hundreds or thousands of rows of data so this is not a trivial conversion.
Bookmarks