Dropping 'nan' with Pearson's r in scipy/pandas
<p>Quick question: Is there a way to use 'dropna' with the Pearson's r function in scipy? I'm using it in conjunction with pandas, and some of my data has holes in it. I know you used to be able suppress 'nan' with Spearman's r in <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.spearmanr.html" rel="noreferrer">older versions of scipy</a>, but that functionality is now missing.</p>

<p>To my mind, this seems like a disimprovement, so  I wonder if I'm missing something obvious. </p>

<p>My code: </p>

<pre><code>for i in range(len(frame3.columns)):    
    correlation.append(sp.pearsonr(frame3.iloc[ :,i], control['CONTROL']))
</code></pre>