title: How to handle Nan values when computing weighted mean
body: <p>I have a weights series like below:</p>
  
  <pre><code>a  0.2
  b  0.3
  c  0.5
  </code></pre>
  
  <p>and a dataframe:</p>
  
  <pre><code>   a    b   c
  1  1    2   2
  2  Nan  2   2
  3  Nan  1   Nan
  ...
  </code></pre>
  
  <p>I want to compute the weighted mean of the dataframe like this:</p>
  
  <pre><code>(dataframe * weights).sum(axis=1) 
  </code></pre>
  
  <p>The problem is that when the value of the dataframe is Nan i want the corresponding weight to be added equally to the other weights. For example for the second row weights should be 0.4 for b and 0.6 for c. And for the third row weight matrix should be 1 for b.</p>