title: How to make column counter that will show when the value in other column change
body: <p>I have a column &quot;status&quot; in dataframe that has following values:</p>
  <pre><code>increase
  increase
  increase
  increase
  decline
  decline
  decline
  increase
  increase
  decline
  </code></pre>
  <p>I need to make counter that will change each time the value in column 'status' change from decline to increase.
  It should look like this:</p>
  <pre><code>&quot;status&quot;          &quot;counter&quot;
  increase          1
  increase          1
  increase          1
  increase          1
  decline           2
  decline           2
  decline           2
  increase          3
  increase          3
  decline           4
  </code></pre>
  <p>What is appropriate way to do it in python?</p>