[SciPy-user] get result array after timeseries operations
Thu Dec 20 10:43:27 CST 2007
On Tuesday 18 December 2007 16:09:05 Tim Michelsen wrote:
> this is meant as a continuation to
> For instance, if I convert data in an hourly frequency to daily averages
> how to I read the daily averages into a array for further processing?
* possibility #1: use the keyword func while converting.
avgdata = convert(data,'D', func=maskedarray.mean)
* possibility #2:
If you don't use the keyword func, you end up with a 2d array, each row being
a day, each column an hour. Just use maskedarray.mean on each row
avgdata = convert(data,'D').mean(-1)
If you only want the values, use the .series attribute, it will give you a
view of the array as a MaskedArray.
> What I would like is an array with just the values of the daily averages .
> Additional a report-like array output with the format
> day value
> 1 3
> 2 11
> would be nice.
Mmh, contact me offlist, I have no idea what you're trying to do here.
> Thanks again for the ice package. Things are looking nice!
thanks a lot for using it, that's the best way to improve it !
More information about the SciPy-user