[SciPy-User] question about timeseries indexing

Christian Prinoth christian@prinoth.n...
Mon Mar 29 10:35:52 CDT 2010

Hi, I am experimenting with scikits.timeseries, and have found a behaviour
that I do not understand.

I have the following time series:
s2 = ts.time_series(np.arange(10),start_date=ts.Date('B','2010-01-01'))

Now, I get the following:

In [79]: s2['2010-01-08']
Out[79]: 5

In [80]: s2['2010-01-09']
Out[80]: 6

In [81]: s2['2010-01-10']
Out[81]: 5

In [82]: s2['2010-01-11']
Out[82]: 6

for lines 80 and 81, I would expect either an error message or 5, but not
two different results.
What is the reason for this behaviour?

Also, more generally, is there some way to index a time series with dates so
that I get the latest available value?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100329/e8678c36/attachment.html 

More information about the SciPy-User mailing list