I am trying to perform automated excel operations, but with cryptocurrency data from Binance. I converted the data to pandas df, and then into a NumPy array.
However, the thing is that I have 1 column of data which is volume. I want to perform a loop function that takes the latest data in my NumPy array and plusses/additions, the last value with the next value, and then iterates through the ids by one calculation at a time.
I seem to be stuck in trying to make a loop, that can iterate through my 1 column and make basic math operations on only a few of the rows at a time, but still being dynamic in that I don't have to type in the ids of the rows I want to make operations on each time.
Example:
Volume
[0] 9212
[1] 3021 [1]+[0] 3021+9212 = x
[2] 3201
[3] 3921 [3]+[2] 3921+3201 = x
[4] 2010
[5] 1999 [5]+[4] 1999+2010 = x
the idea is that it iterates by creating additions on the way up, or any other math operations.
Any suggestions as to what I can do?