title: Need to fill the non zero values in my sales column until non zero value appears with reference to a value in another column
body: <p>Say I have 4 columns, id,brand, flag and sales:
  For each unique combination of id and brand, where flag == 1, I move to corresponding row in sales column(say here sales value is x and following rows have value 0) and start to look at the following rows until a non-zero value appears. Need to fill these zero cells along with the value x with a number which is equal to (value(x)/number of zeroes following x+1)</p>
  
  <pre><code>Flag  Sales
  0   4
  1   15
  0   0
  0   0
  0   2
  0  0
  1 10
  0  0
  0  3
  0  0
  </code></pre>
  
  <p>output should be:</p>
  
  <pre><code>Flag  Sales
  0   4
  1   5
  0   5
  0   5
  0   2
  0  0
  1  5
  0  5
  0  3
  </code></pre>