Group by first column of data, not first character

Previously, the code would only have worked if the group ids were a
single digit (i.e. <10)

Signed-off-by: Adam Obeng <github@binaryeagle.com>
Merge pull request #2 from adamobeng/master

Group by first column of data, not first character