[SciPy-User] find particular day_of_week

Robert Ferrell ferrell@diablotech....
Wed Jan 27 15:18:09 CST 2010


I have a time series, I want to operate (read only) on all the items  
with a particular day_of_week.  What is an efficient way to get at  
those?

I've tried:

		desiredDates = [dt for dt in myTS.dates if dt.day_of_week ==  
day_of_week]

                 desiredSeries = myTS[desiredDates]

but that seems quite slow.  The second line is the one which is taking  
all the time.  Is there a faster way?  I don't need a copy, just a  
view, if that helps.

thanks,
-robert



More information about the SciPy-User mailing list