[SciPy-User] scikits.timeseries 'Combine TimeSeries objects'
Pierre GM
pgmdevlist at gmail.com
Mon Feb 8 15:15:50 EST 2010
On Feb 8, 2010, at 3:09 PM, Nancy Lee wrote:
>
>
> Hi everyone,
>
> I have one question about the scikits.timeseries TimeSeries objects.
> Is there any function that can combine multiple timeseries objects into one in the correctchronological order?
> For example, I have A timeseries object with '2009-02-03' data, and B timeseries object with '2009-02-04' data, and C with '2009-02-05' data, how can I get one timeseries from 2009-02-03 to 2009-02-05 ?
> Any suggestion? thanks a lot!
Only one date per TimeSeries ? Mmh, that's not really how it's supposed to work, but hey...
Try ts.concatenate
>>> A=ts.time_series([1],start_date="2010-01",freq="M")
>>> B=ts.time_series([2],start_date="2009-12",freq="M")
>>> C=ts.time_series([3],start_date="2010-02",freq="M")
>>> ts.concatenate((A,B,C))
timeseries([2 1 3],
dates = [Dec-2009 ... Feb-2010],
freq = M)
More information about the SciPy-User
mailing list