hi John,
if you're using ddply and rbind I don't see any reason you can't do
this with groupby and the apply function. Write a function that takes
a piece of the DataFrame for each organization and computes the result
that you're looking for. maybe something like:
def get_cumsum(piece):
indexed_piece = piece.set_index('date')
indexed_piece = indexed_piece.asfreq(DateOffset(1))
return indexed_piece['sum'].cumsum()
then do:
df.groupby('organization_name').apply(get_cumsum)
I think that plyr ddply usage should very easily onto groupby but
there may be a bit of finagling involved since time series operations
require that the Series or DataFrame have a datetime index. if you
can't get it to work (sort of shooting from the hip here) please let
me know
hope this helps,
Wes