[SciPy-User] Sum duplicate dates in a series

Pierre GM pgmdevlist@gmail....
Fri Jan 29 13:13:44 CST 2010


On Jan 29, 2010, at 2:00 PM, John Hunter wrote:
> On Fri, Jan 29, 2010 at 12:42 PM, Pierre GM <pgmdevlist@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

John,
Could you have a look into numpy.lib.recfunctions ? That's an attempt to homogenize what you did for matplotlib, and it'd be great if you could help.


More information about the SciPy-User mailing list