title: How to get the number of continuous increase data point in Pandas dataframe
body: <p>Thanks for your help in advance!
  I have one dataframe. say, for colume incr, the number if 0 1 1 1 -1 0 1 1 ...., I would like to get parse the list and get for each datapoint, how many times the data list had increased (or more exactly not decreased); decrease in the point would reset the output into zero for the current data point.  for example for the list (named output['inc_adj'] in the code )
  0 1 1 1 -1 0 1 -1
  I should get named output['cont_inc'] in the code
  1 2 3 4  0 1 2  0</p>
  
  <p>I wrote the following code, but it is very inefficient, any suggestion for improve the efficiency significantly, please? It seemed that I am keeping reloading the cache in CPU among the two loops(if my feeling is correct), but I could not find a better solution at the current stage.</p>
  
  <blockquote>
  <pre><code>output['cont_inc']=0;
  for i in xrange(1,output['inc_adj'].count()):
      j=i;
      while(output['inc_adj'][j] != -1):
            #for both increase or unchanged
          output['cont_inc'][i]+=1;
          j-=1
  </code></pre>
  </blockquote>
  
  <p>Thanks in advance!</p>