Hello, I am currently working with some data tables from CSV data but I need to work over the data a bit before aggregating it. What I want to do is merge or group the rows of a single data table based off a shared value in one of the rows.
Stats
UserID
Last Name
First Name
Location
Stat1
ID3
User1
Test
Location1
Stat2
ID3
User1
Test
Location1
Stat3
ID3
User1
Test
Location1
Stat1
ID4
User2
Test2
Location1
Stat2
ID4
User2
Test2
Location1
Stat1
ID5
User3
Test3
Location1
Stat2
ID5
User3
Test3
Location1
Stat3
ID5
User3
Test3
Location1
Stat4
ID5
User3
Test3
Location1
Stat5
ID5
User3
Test3
Location1
Stat6
ID5
User3
Test3
Location1
So in this example, I would want the first column to combine Stats1-3 using Column 3 (the UserID) as the shared value. So the first column would be “Stat1, Stat2, Stat3” for User ID3, “Stat1, Stat2” for ID4 and so on, with the other columns remaining the same. What would be the cleanest and quickest way to run through the data table and do this?