kumulative Häufigkeit für Python -Datenframe
df['Cumulative Frequency'] = df['Frequency'].cumsum()
Cheerful Chipmunk
df['Cumulative Frequency'] = df['Frequency'].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
import pandas as pd
s = pd.Series([0, 1, -2, 5, 10, -3])
s.cummax()
>>>
0 0
1 1
2 1
3 5
4 10
5 10
dtype: int64