[SciPy-User] find particular day_of_week

Robert Ferrell ferrell@diablotech....
Wed Jan 27 15:48:31 CST 2010


On Jan 27, 2010, at 2:42 PM, Pierre GM wrote:

> On Jan 27, 2010, at 4:18 PM, Robert Ferrell wrote:
>> 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?
>
>
>>>> import scikits.timeseries as ts
>>>> s = ts.time_series(np.arange(365), start_date="2010-01-01",  
>>>> freq="D")
>>>> s[s.day_of_week == 1]
> That'll return you the points falling on Tuesdays (Mon=0, Sun=6)

Thanks.  That's the solution I eventually found.  I need to remember  
to look for the cool stuff in time series first, since it's usually in  
there.  Fast, and easy to understand, too.

thanks,
-robert



More information about the SciPy-User mailing list