There are columns of data, and as a simple example they are {{1,a},{1,b},{1,c},{2,a},{2,b},{2,c},{3,a}} of two columns and seven lines. I'd like to process the data through a function which would yield {{{1,2},{a,b,c}},{{3},{a}}} which is slightly better than {{{1,2,3},{a}},{{1,2},{b,c}}} because former has 7 leaf elements vs latter 8 leaf elements while both has if you will two lines.
How to write that function?