Использование DataFrames.jl
:
julia> using DataFrames
julia> list = [(rand('a':'e'), rand(0:9)) for j in 1:8 ]
8-element Array{Tuple{Char,Int64},1}:
('b', 4)
('b', 4)
('d', 4)
('e', 8)
('b', 2)
('c', 4)
('c', 3)
('b', 5)
julia> df = DataFrame(letter = first.(list), number = map(t -> t[2], list));
julia> gp = groupby(df, :letter);
julia> [[(r.letter, r.number) for r in eachrow(gdf)] for gdf in gp]
4-element Array{Array{Tuple{Char,Int64},1},1}:
[('b', 4), ('b', 4), ('b', 2), ('b', 5)]
[('d', 4)]
[('e', 8)]
[('c', 4), ('c', 3)]
Если ваши данные большие, вы можете захотеть JuliaDB.jl