title: Pandas corr() returning NaN too often
body: <p>I'm attempting to run what I think should be a simple correlation function on a dataframe but it is returning NaN in places where I don't believe it should.  </p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code># setup
  import pandas as pd
  import io
  
  csv = io.StringIO(u'''
  id  date    num
  A   2018-08-01  99
  A   2018-08-02  50
  A   2018-08-03  100
  A   2018-08-04  100
  A   2018-08-05  100
  B   2018-07-31  500
  B   2018-08-01  100
  B   2018-08-02  100
  B   2018-08-03  0
  B   2018-08-05  100
  B   2018-08-06  500
  B   2018-08-07  500
  B   2018-08-08  100
  C   2018-08-01  100
  C   2018-08-02  50
  C   2018-08-03  100
  C   2018-08-06  300
  ''')
  
  df = pd.read_csv(csv, sep = '\t')
  
  # Format manipulation
  df = df[df['num'] &gt; 50]
  df = df.pivot(index = 'date', columns = 'id', values = 'num')
  df = pd.DataFrame(df.to_records())
  
  # Main correlation calculations
  print df.iloc[:, 1:].corr()
  </code></pre>
  
  <p><strong>Subject DataFrame:</strong></p>
  
  <pre><code>       A      B      C
  0    NaN  500.0    NaN
  1   99.0  100.0  100.0
  2    NaN  100.0    NaN
  3  100.0    NaN  100.0
  4  100.0    NaN    NaN
  5  100.0  100.0    NaN
  6    NaN  500.0  300.0
  7    NaN  500.0    NaN
  8    NaN  100.0    NaN
  </code></pre>
  
  <p><strong>corr() Result:</strong></p>
  
  <pre><code>    A    B    C
  A  1.0  NaN  NaN
  B  NaN  1.0  1.0
  C  NaN  1.0  1.0
  </code></pre>
  
  <p>According to the (limited) <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.corr.html" rel="noreferrer">documentation</a> on the function, it should exclude "NA/null values".  Since there are overlapping values for each column, should the result not all be non-NaN?</p>
  
  <p>There are good discussions <a href="https://stackoverflow.com/questions/42579908/use-corr-to-get-the-correlation-between-two-columns">here</a> and <a href="https://stackoverflow.com/questions/31619578/numpy-corrcoef-compute-correlation-matrix-while-ignoring-missing-data">here</a>, but neither answered my question.  I've tried the <code>float64</code> idea discussed <a href="https://stackoverflow.com/questions/40453337/python-cannot-make-corr-work">here</a>, but that failed as well.</p>
  
  <p>@hellpanderr's comment brought up a good point, I'm using 0.22.0</p>
  
  <p><em>Bonus question - I'm no mathematician, but how is there a 1:1 correlation between B and C in this result?</em></p>