title: Perfrom cumulative sum over a column but reset to 0 if sum become negative in Pandas
body: <p>I have a pandas dataframe with two columns like this,</p>
  
  <pre><code>Item    Value
  0   A   7
  1   A   2
  2   A   -6
  3   A   -70
  4   A   8
  5   A   0
  </code></pre>
  
  <p>I want to cumulative sum over the column, <code>Value</code>. But while creating the cumulative sum if the value becomes negative I want to reset it back to 0.</p>
  
  <p>I am currently using a loop shown below to perform this,</p>
  
  <pre><code>sum_ = 0
  cumsum = []
  
  for val in sample['Value'].values:
      sum_ += val
      if sum_ &lt; 0:
          sum_ = 0
      cumsum.append(sum_)
  
  print(cumsum) # [7, 9, 3, 0, 8, 8]
  </code></pre>
  
  <p>I am looking for a more efficient way to perform this in pure pandas. </p>