[SciPy-user] calculations using the datetime information of timeseries

Pierre GM pgmdevlist at gmail.com
Thu Nov 13 10:23:50 EST 2008


Timmie,
> As note on my last email I may add that I simplyfied the functions  
> (method 1-3).
> The different methods were only created to illustrate how I handle/ 
> access the
> series.

I got that. My comments were themselves intended for illustration ;)

>> As a wrap-up:
>> Try to avoid looping if you can.
> Yes, I noticed that.
> But I couldn't find another way to pass the individual datetimes to my
> calculation function which expects only one value at once (i.e. it  
> is not
> designed to calculate full arrays).

That might be a bottleneck. If you could modify your function so that  
it can process arrays, you should get better results. Of course, that  
depends on the actual function...
When I asked whether you really needed datetime objects, I was  
thinking about the actual datetime.datetime objects, not about objects  
having, say, a `day` or `hour` property. If you send an example of  
function closer to your actual need, I may be able to help you more.



More information about the SciPy-User mailing list