[SciPy-User] failing to create a scikit.timeseries object

Robert Ferrell ferrell at diablotech.com
Wed Jun 2 15:03:18 EDT 2010


With just datetime data, you probably want to create a DateArray.  I  
think that second resolution is the highest frequency available (at  
least that's what I see in the documentation).

Here's how to make a date array:

ts.date_array(freq='S', dlist=d)
DateArray([01-Jan-2010 10:10:02, 01-Jan-2010 10:10:02],
           freq='S')

I don't know if timeseries Date objects can resolve microsecond  
differences.

-r

On Jun 2, 2010, at 3:49 AM, Emanuele Rocci wrote:

> Hi All
>
> I am trying to create a scikit.timeseries object starting from 2  
> datetime objects.
>
> If I understood correctly it should be possible to create a  
> scikits.timeseries starting fromdatetime objects.
>
> I try the following code but it says that Insufficient parameters.
>
> The 2 datetime differs for few microseconds. In this case what  
> should be the value for freq parameter?
>
> Is what I am trying allowed? In theory, since timeseries can be  
> based on datetime objects it should be possible to hanlde up to  
> microsecond , is this correct?
>
> I think that this is not really clear to me.
>
> Regards Eo
>
> import datetime
> import sckilits.timeseries as ts
>
> tm1 = datetime.datetime( 2010,1,1, 10,10,2, 123456 )
> tm2 = datetime.datetime( 2010,1,1, 10,10,2, 345678 )
> d = [ tm1, tm2 ]
> tseries = ts.time_series( dates=d )
> tseries = ts.time_series( d )
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20100602/4f8aae3e/attachment.html>


More information about the SciPy-User mailing list