Hi I'd like to convert a file that's tab delimited and looks like this:
Species Date Data
1 Dec 3
2 Jan 4
2 Dec 6
2 Dec 3
to a matrix like this (species is the row header):
1 2
Dec 3 9
Jan 4
I'm guessing the part of the solution is to create a dictionary with two keys and use defaultdict to append new values to a key pair. I'd like to spit this out into tab-delimited form but also get into a format so that I can use the cluster part of scipy.