title: Finding first negative values and repacing with last non zero values?
body: <p>I have a dataframe:</p>
  
  <pre><code>          hrs          running_hrs  
  0     203.889578           24  
  1     155.929832           24  
  2     180.248357           24  
  3     112.502220           24  
  4     102.261148           24  
  5      86.982634           24  
  6      35.552699           24  
  7      29.260349           24  
  8      0.577342            24  
  9     -23.297091            0  
  10    -42.875767            0  
  11    -77.278587            0  
  </code></pre>
  
  <p>I have to search for the first negative value from the hrs column and replace the running_hrs with the last non zero value of the hrs column.</p>
  
  <p>Expected output:</p>
  
  <pre><code>          hrs          running_hrs  
  0     203.889578           24  
  1     155.929832           24  
  2     180.248357           24  
  3     112.502220           24  
  4     102.261148           24  
  5      86.982634           24  
  6      35.552699           24  
  7      29.260349           24  
  8      0.577342            24  
  9     -23.297091        0.577342  
  10    -42.875767            0  
  11    -77.278587            0  
  </code></pre>
  
  <p>I tried finding the negative values but all negative values were selected.</p>
  
  <p>Can anybody suggest the correct way to do it?</p>