[['test', '172.18.74.146', '13:05:43.834', '2015_08_07'],
['test', '172.18.74.148', '12:27:39.016', '2015_08_07'],
['blah', '172.18.74.149', '11:18:33.846', '2015_08_12'],
['blah', '172.18.74.146', '12:27:38.985', '2015_08_12']]
I would like the final result to be grouped by date and the project name
[["test", "172.18.74.146, 172.18.74.148", "13:05:43.834, 12:27:39.016" ,
"2015_08_07"], etc..]
The names will not be the same for the given date.
How can I do this? I tried using groupby.
for g, data in groupby(sorted(my_list, key=itemgetter(0)), itemgetter(0)):
print(g)
for elt in data:
print(' ', elt)
but it didnt give me what I wanted.
groupby(mylist, key=itemgetter(0, 3))?