[SciPy-User] Sum duplicate dates in a series

John Hunter jdh2358 at gmail.com
Fri Jan 29 14:00:06 EST 2010


On Fri, Jan 29, 2010 at 12:42 PM, Pierre GM <pgmdevlist at gmail.com> wrote:
> On Jan 29, 2010, at 1:16 PM, Robert Ferrell wrote:
>> How can I sum data for duplicate dates in a time series?  I can do it
>> with a loop, but I wonder if there is some tricky magic I might use.

If you can put your data in a record array, you can use
matplotlib.mlab.rec_groupby

http://matplotlib.sourceforge.net/api/mlab_api.html#matplotlib.mlab.rec_groupby

http://matplotlib.sourceforge.net/examples/misc/rec_groupby_demo.html

JDH



More information about the SciPy-User mailing list