Building Time Based Bins

MCD mcdesigns at walla.com
Mon Mar 21 19:07:57 EST 2005


Thanks Alessandro... I'll have to try that as well.

I have a modified working version of John's code (thanks John!). I'm
able to output the bins by 5min intervals, sum one of the fields, and
get the high and low of each field. So far I'm really happy with how it
works. Thank you to everybody.

The only thing that I'd like to do, which I've been racking my brain on
how to do in python... is how to keep track of the bins, so that I can
refer back to them. For instance, if I wanted to get "binlo" from two
bins back... in the scripting language I was working with (pascal
based) you could create a counting series:

for binlo = binlo - 1 do
begin

 2binlosBack = (binlo - 2)

    # if it was 12:00, I'd be looking back to 11:50

I would really appreciat if anyone could explain to me how this could
be accomplished using python grammar... or perhaps some other method
"look back" which I'm unable to conceive of.

Many thanks,
Marcus




More information about the Python-list mailing list