[SciPy-User] How to concatenate timeseries
Mon Jan 4 11:50:34 CST 2010
On Jan 4, 2010, at 12:19 PM, Tim Michelsen wrote:
> What is the best methoth concatenate these to one long running time series?
> I tried:
> import scikits.timeseries as ts
> series = ts.time_series([0,1,2,3], start_date=ts.Date(freq='A', year=2005))
> series1 = ts.time_series([0,1,2,3], start_date=ts.Date(freq='A', year=2009))
> import numpy as np
> full = np.concatenate([series, series1])
> But the full series has then the frequency 'U' for undefined.
> What am I missing?
Use the concatenate function that comes with scikits.timeseries
timeseries([0 1 2 3 0 1 2 3],
dates = [2005 ... 2012],
freq = A-DEC)
ts.concatenate tests whether the series have the same frequency, and optional parameters let you decide what to do with duplicates.
More information about the SciPy-User