I have a csv file where I'm trying to find all the uniq values in columns past column 2 where column 1 has the same value and consolidate that in a new csv file. I know, that sounds way confusing so here's an example:
a sample of the original file foo.csv:
"Boom Lifts","Model Number","Manufacturer","Platform Height","Horizontal Outreach","Lift Capacity"
"Boom Lifts","Model Number","Platform Height","Horizontal Outreach","Up & Over Height","Platform Capacity"
"Boom Lifts","Model Number","Platform Height","Horizontal Outreach","Up & Over Height"
"Pusharound Lifts","Model Number","Manufacturer","Platform Height","Stowed Height"
"Scissor Lifts","Model Number","Manufacturer","Platform Height","Stowed Height","Overall Dimensions","Platform Extension"
"Scissor Lifts","Overall Dimensions","Platform Size","Platform Extension","Lift Capacity"
the ideal outcome bar.csv:
"Boom Lifts","Model Number","Manufacturer","Platform Height","Horizontal Outreach","Lift Capacity","Up & Over Height","Platform Capacity",,,
"Pusharound Lifts","Model Number","Manufacturer","Platform Height","Stowed Height"
"Scissor Lifts","Model Number","Manufacturer","Platform Height","Stowed Height","Overall Dimensions","Platform Size","Platform Extension","Lift Capacity"
each of the rows is of varying length and it's a pretty huge file (over 5k lines), I'm totally scratching my head on how to do the matching / string manipulation. And yes, some of those lines have trailing commas where there are 'empty cells'. I've been using Faster CSV so if there is a way to do this with that, it would be great.
pointers? preferably something that won't make my mbp come to a screeching halt?