[Numpy-discussion] Timeseries scikit - dates prior to 1900

Bevan Jenkins bevan07@gmail....
Tue Oct 21 20:51:13 CDT 2008


Hello,

I have just stumbled into a slight issue with scikits.timeseries and dates 
prior to 1900.  Timeseries requires dates to be >= 1900.  It took me a little 
while to discover this because I was trying to create dates at a frequency 
greater than daily (e.g. hourly) which leads to python crashing.  Once I 
reduced the frequency to daily, the error let me know about the 1900 issue as 
below:
In [1]: import scikits.timeseries as ts

In [2]: D = ts.Date(freq='D', year = 1850, month = 1, day =1)

In [3]: print (D)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

ValueError: year=1850 is before 1900; the datetime strftime() methods require 
year >= 1900

This is what i was trying initially:

In [4]: E = ts.Date(freq='H', year = 1850, month = 1, day =1, hour =0)

In [5]: print (E)

<<python.exe crashes>>


I was wondering if there is anyway to use timeseries with dates <1900?
If not I will forgo timeseries for the select few datasets I have with data 
<1900.

Thanks for the v. useful scikit,

Bevan Jenkins





More information about the Numpy-discussion mailing list