title: Pandas dataframe - count the sum of rows up to the condition and compare it with the list elements
body: <p>I have this data example:</p>
  
  <pre><code>           0         1         2         3        
  2  Text1   1         1         5         5,00       
  3  Text2   8         4         0         0,00     
  4  Text3   1         3         0         2,00     
  5  SUM     6         0         0         7,00       
  6  Text1   1         1         0         10        
  7  Text2   8         4         0         0,00     
  8  Text3   1         3         0         0,00
  8  Text4   1         3         0         2,02       
  9  SUM     6         0         0         20
  </code></pre>
  
  <p>I would like to count the sum of individual rows of last columns until the word "SUM" appears in <code>df[0]</code> 
  and then assign the result of this sum to the list.
  For example:<br/><br/>
  First sum should be like: <code>Text1 row + Text2 + Text3</code> = <code>5,00 + 0,00 + 2,00</code> - sum of <code>df[:, -1]</code> in the preceding rows <code>df[0]=='SUM'</code><br/><br/>
  and then the first element of the list is <code>['7,00']</code><br/>
  then the sum of the last column in the rows preceding the word <code>SUM</code> in <code>df[0]</code>:
  <code>Text1+Text2+Text3+Text3</code> = <code>10+0+0+2,02</code><br/>
  and then the second element of the list is <code>['12,02']</code> and the whole list now looks like that: <code>['7,00'],['12,02']</code> or <code>['7,00','12,02']</code></p>
  
  <p>finally, I would like to compare the whole list with <code>df.loc[(df[0] == 'SUM')]</code><br/>
  Is such a counting of the sum under conditions possible from df?<br/>
  Give me some hints or instructions how I can do it and whether it is possible at all.</p>