title: df.corr showing all data as 1 when read from compiled csv, even though there is data that is different
body: <p>I have a compiled data frame of sp500 stock data that I am trying to find correlations with using <code>df.corr()</code>, but it is labeling all data as having a '1' correlation when I run the program, and when I use a heat map to visualize the data it shows an entire green chart, when there should be many many different positive and negative correlations. </p>
  
  <p>Using Python 3.6 and Spyder </p>
  
  <p>here is the code I am using:</p>
  
  <pre><code>def visualize_data():
  df = pd.read_csv('sp500_joined_closes.csv')
  pd.options.display.float_format = '{:.5f}'.format
  #df['AAPL'].plot()
  #plt.show()
  df_corr = df.corr() #creates a correlation table of our data frame.  Generates correlation values       
  print(df_corr.head())
  
  data1 = df_corr.values #gets inner values of our data frame 
  fig1 = plt.figure() #specify our figures
  ax1 = fig1.add_subplot(1,1,1) #defined axis 1 by 1 plot 1
  
  heatmap1 = ax1.pcolor(data1, cmap=plt.cm.RdYlGn) #sets the color paramater of heat map (negative,neutral,positive)
  fig1.colorbar(heatmap1)
  ax1.set_xticks(np.arange(data1.shape[0]) + 0.5, minor=False) #sets x ticks for heat map, arranging ticks at every 0.5(half-mark)
  ax1.set_yticks(np.arange(data1.shape[1]) + 0.5, minor=False) #sets y ticks for heat map
  ax1.invert_yaxis() #removes random gap from the top of graph
  ax1.xaxis.tick_top() #moves x axis ticks to the top (meant to look more like a table)
  
  column_labels = df_corr.columns
  row_labels = df_corr.index
  
  ax1.set_xticklabels(column_labels)
  ax1.set_yticklabels(row_labels)
  
  plt.xticks(rotation=90)
  heatmap1.set_clim(-1,1)
  plt.tight_layout()
  #plt.savefig("correlations.png", dpi = (300))
  plt.show()
  </code></pre>
  
  <p>visualize_data()</p>
  
  <p>The interesting thing is that I searched all over for anyone having a similar error, and I cannot seem to find any answers.  Could it be that the ticker symbols could be considered categorical and therefore something is getting skewed?  I'm not quite sure here, to be honest.  </p>
  
  <p>Even when I tried to plot the correlations for one single company against all the data as seen by <code>#df['AAPL'].plot()</code> and <code>#plt.show()</code> the same exact thing happened where the data is only registering a correlation value of <code>1.0000</code> to all of the data.  </p>
  
  <p>I initially thought it was a rounding error due to significant figures, so I put in <code>pd.options.display.float_format = '{:.5f}'.format</code> but that didn't work and i still am receiving the skewed correlation.</p>
  
  <p><a href="https://i.stack.imgur.com/DnFOZ.png" rel="nofollow noreferrer">Here is a screenshot of the issue and the subsequent heat map</a>    </p>
  
  <p><a href="https://i.stack.imgur.com/9UcH0.png" rel="nofollow noreferrer">Here is a screenshot of part of the data, confirming that it isn't all the same or that is has become corrupted in some measure</a></p>