[SciPy-user] get result array after timeseries operations
Pierre GM
pgmdevlist at gmail.com
Thu Dec 20 11:43:27 EST 2007
On Tuesday 18 December 2007 16:09:05 Tim Michelsen wrote:
> Hi,
> 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
mailing list