On Mon, 5 Apr 2010, Allin Cottrell wrote:
But anyway, I'm attaching a version of my script which requires
only that the dataset be sorted by supermarket... It works on
your sample file and I guess it should work on your full file; I
believe that the only change that should be required is
adjusting the name of the XLS (or gdt) file to read in the first
instance.
Ah, I see that I left one date "hard-wired". To make it fully
general you can change the line under the comment "# starting row
for current price":
from:
k = s0 + store_days(2007, 3, prevyear, prevmonth) \
+ start
to:
k = s0 + store_days(limits[1], limits[2], prevyear, prevmonth) \
+ start
Allin Cottrell