title: Find first zero in row of pandas DataFrame
body: <p>I have a DataFrame, we'll call <code>a</code>, that looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/3OnV8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3OnV8.png" alt="enter image description here"></a></p>
  
  <p>I have another DataFrame of the same form, but contains different figures. I am trying to fill the last non-zero value with the value in the same location of the other DataFrame. I'm having trouble even conceptualizing how to do this without looping through each row, then each column for that row and doing value comparisons. Is there another, better, way to do this?</p>