title: How can I calculate correlation between different values of a python dictionary?
body: <p>I am learning python.I want to calculate correlation between values.Below is my data which is a dictionary. </p>
  
  <pre><code>My_data = {1: [1450.0, -80.0, 840.0, -220.0, 630.0, 780.0, -1140.0], 2: [1450.0, -80.0, 840.0, -220.0, 630.0, 780.0, -1140.0],3:[ 720.0, -230.0, 460.0, 220.0, 710.0, -460.0, 90.0] }
  </code></pre>
  
  <p>This is what I expect to have in return.</p>
  
  <pre><code>    1     2      3
  1   1     0.69  0.77
  2         1     0.54
  3               1
  </code></pre>
  
  <p>This is the code I tried. I get TypeError:unsupported operand type(s) for /: 'list' and 'long'
  I am not sure what went wrong. I would appreciate if somebody explains me and help me get the desired solution.</p>
  
  <pre><code>my_array=np.array(My_data .values())
  Correlation = np.corrcoef(my_array,my_array)
  </code></pre>