I'm trying to run a for loop with specific intervals. It's a big data file and I need the cumulative sum to a specific number of every single product. In the last column I can see when a new Product starts.
For example:
Specific sum for second Product, 7: 6.1 + 1.0 > 7 --> mark this row (1.0) and jump to the next Product with Change '1'.
for i in range (0, 3):
    ....
    ....
DATE         PRODUCT        PRICE   Change
01.01.2017   NEG_00_12       2.0      0
01.01.2017   NEG_00_12       8.9      0
01.01.2017   NEG_12_24       6.1      1
01.01.2017   NEG_12_24       1.0      0
01.01.2017   NEG_12_24       2.3      0
02.01.2017   NEG_00_12       4.1      1
02.01.2017   NEG_00_12       5.0      0
 
     
    