Check for max value of iterative sum in pandas
I believe you need a cumulative sum and then to locate the max.
>>> df = pd.DataFrame({'a':[-0.000601, 0.000001, 0.000000, 0.000007, 0.000300, -0.000300]})
>>> df
out:
a
0 -0.000601
1 0.000001
2 0.000000
3 0.000007
4 0.000300
5 -0.000300
>>> df['b'] = df.cumsum()
>>> df
out:
a b
0 -0.000601 -0.000601
1 0.000001 -0.000600
2 0.000000 -0.000600
3 0.000007 -0.000593
4 0.000300 -0.000293
5 -0.000300 -0.000593
>>> df[df['b'] == df['b'].max()]
out:
a b
4 0.0003 -0.000293