title: pandas - Count streak of values higher/lower than current rows
body: <p>I'm looking for a way to take a pandas Series and return new Series representing the number of prior, consecutive values that are higher/lower than each row in the Series:</p>
  
  <pre><code>a = pd.Series([30, 10, 20, 25, 35, 15])
  </code></pre>
  
  <p>...should output:</p>
  
  <pre><code>Value   Higher than streak  Lower than streak
  30      0                   0
  10      0                   1
  20      1                   0
  25      2                   0
  35      4                   0
  15      0                   3
  </code></pre>
  
  <p>This will allow someone to identify how important each "regional max/min" value is in a time series.</p>
  
  <p>Thanks in advance.</p>