What will be the more appropriate method to add a cumulative sum column to
a data frame. For example, assuming that I have the next data frame:

flag | price
----------------------
1    |47.808764653746
1    |47.808764653746
1    |31.9869279512204


How can I create a data frame with an extra cumsum column as the next one:

flag | price          | cumsum_price
----------------------|-------
1    |47.808764653746 | 47.808764653746
1    |47.808764653746 | 95.6175293075
1    |31.9869279512204| 127.604457259


Thanks
-- 
Cesar Flores

Reply via email to