looks like you're data hiding, i.e. using an implicit value of something to then decide what column/month it is. this is generally bad and no longer done in this day and age of cheap storage. so to cut to the chase, make the implicit explicit, i.e. store the column number (or even better month number and/or name) as part of the hash. then you adjust the code to stop relying on implicit order of data. it also opens up avenues of further flexibility, e.g. can summarize data by quarter etc etc.
also just in case the sums of these decimal point numbers really matter using a non floating point math library. typical gotcha is doing a conditional on numbers supposed to add to 100 percent or similar, when in fact floating point math can produce something not quite 100 percent, and the conditional fails.
btw for aesthetics, columns of decimal numbers are best decimal point justified..which is a fun little excercise in itself.
cheers.
the hardest line to type correctly is: stty erase ^H