merge rows csv by id ruby
问题 I have a .csv file that, for simplicity, is two fields: ID and comments. The rows of id's are duplicated where each comment field had met max char from whatever table it was generated from and another row was necessary. I now need to merge associative comments together thus creating one row for each unique ID, using Ruby. To illustrate, I'm trying in Ruby, to make this: ID | COMMENT 1 | fragment 1 1 | fragment 2 2 | fragment 1 3 | fragment 1 3 | fragment 2 3 | fragment 3 into this: ID |