title: Is there a way to find the last date before the date in the current row where the amount is not 0?
body: <p>I've a pandas dataframe like:</p>
  
  <pre><code>Date, Amount
  01/01/2020, 10
  01/02/2020, 15
  01/03/2020, 0
  01/04/2020, 11
  01/05/2020, 0
  01/06/2020, 15
  01/07/2020, 12
  ...
  </code></pre>
  
  <p>I would like to add a new column (namely "Before") the shows the number of days since the last 0 Amount. e.g.</p>
  
  <pre><code>Date, Amount, Before
  01/01/2020, 10, 0
  01/02/2020, 15, 0
  01/03/2020, 0, 0
  01/04/2020, 11, 1
  01/05/2020, 0, 0
  01/06/2020, 15, 1
  01/07/2020, 12, 2
  ...
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thank you in advance</p>