python - Summing all rows above the current row based on the values -
i new python , stackoverflow please forgive me if question ask has been answered in previous thread.
i working python data frame similar 1 below. wish have "build balance" each client sum of balances particular row. example cell d6 in attached image sum of balances john account appearing between row 2 , row 6. in advance. keep simple.
keep simple? want begin? if new python say, use pandas working data frames. following sum column want , assign variable
sum_column = df['column_name'].sum()
Comments
Post a Comment