title: count of non null column values with range() pandas
body: <p>I have dataframe like:</p>
  <pre><code>id     date     sum
  a    1/1/2001  
  a    1/1/2001
  a    1/1/2001
  a    1/1/2001    50
  a    1/1/2001    10
  a    1/1/2001    60
  b    1/1/2001
  b    1/1/2001
  b    1/1/2001    100
  b    1/1/2001    100
  b    1/1/2001    
  b    1/1/2001    100
  </code></pre>
  <p>I want a new column named Rolling which will be cumsum/cumcount but problem is cumsum is not adding null values as its empty but denominator count is taking the null values also.My code is</p>
  <pre><code>df['Rolling'] = df.groupby('id').apply(lambda x: x['sum'].cumsum()/ range(1,len(x)+1))).values
  </code></pre>
  <p>I want my output as:</p>
  <pre><code>id     date     sum  Rolling
  a    1/1/2001  
  a    1/1/2001
  a    1/1/2001
  a    1/1/2001    50    50  #50/1
  a    1/1/2001    10    30  #50+10/2
  a    1/1/2001    60    40  #50+10+60/3
  b    1/1/2001
  b    1/1/2001
  b    1/1/2001    100  100  #100/1
  b    1/1/2001    100  100  #100+100/2
  b    1/1/2001    
  b    1/1/2001    100  100    #300/3 
  </code></pre>
  <p>but instead i am getting:</p>
  <pre><code>id     date     sum  Rolling
  a    1/1/2001  
  a    1/1/2001
  a    1/1/2001
  a    1/1/2001    50    12.5  #50/4
  a    1/1/2001    10    12    #50+10/5
  a    1/1/2001    60    20  #50+10+60/6
  b    1/1/2001
  b    1/1/2001
  b    1/1/2001    100  33.33 #100/3
  b    1/1/2001    100  50    #200/4
  b    1/1/2001    
  b    1/1/2001    100  50    #300/6   
  </code></pre>