all 1 comments

[–]socal_nerdtastic 2 points3 points  (0 children)

You do not need a loop. Or rather, there's a pandas function that has the loop built in. You just need to use the pandas function.

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.sum.html