Quote from rosy2:
you said you have a csv file of data. Isnt that file already sorted by date? so you dont need to worry about sorting. you just get the data put it in an object and add that to a list. This is trivial. You probably spent more time typeing on this forum thread than it would take to code it. if you need a sort then put the objects in a tree
Yes the file is sorted by date. Here's the issue though: Each date has ~390 minutes of price data associated with it. For example:
09/11/2009 9.30 o, h, l, c
09/11/2009 9.31 o, h, l, c
and so on to
09/11/2009 16.14 o, h, l, c
That completes one day, and then starts the next which could be 9/14/2009 due to weekend, say.
What I want to do is simple analysis for now: for ex, find the time at which the low was made for each date in my data file. That requires that I be able to iterate over each date in sequence and because of weekends and holidays, that sequence is not a simple as +1 each time.
From the responses so far, it looks like best bet is to convert the date string into a long using strptime()?