Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas cumsum

import pandas as pd

s = pd.Series([0, 1, -2, 5, 10, -3])
s.cumsum()
>>>
	0     0
	1     1
	2    -1
	3     4
	4    14
	5    11
	dtype: int64
 
PREVIOUS NEXT
Tagged: #pandas #cumsum
ADD COMMENT
Topic
Name
6+8 =