title: Getting nan for p values in scipy chisquare: Don't know why?
body: <p>Would be very grateful for help with this issue. It seems like it should be straightforward.</p>
  
  <p>I have two columns in a pandas dataframe called Totals: Totals['Connections'] and Totals['Expected']. Totals['Connections'] contains the observed number of incidences of my relevant variable; Totals['Expected'] contains the expected number of observations. I want to compare the two using the scipy chisquare function. I do this in the following way:</p>
  
  <pre><code>sp.stats.chisquare([Totals.Connections], f_exp=[Totals.Expected]) 
  </code></pre>
  
  <p>However, when I do, I get a valid test statistic, but an 'nan' for my p value, as below (see below). Also, what does the 'Power_divergence' text at the start of the result mean?  Can anyone explain what I'm doing wrong here?</p>
  
  <pre><code>Power_divergenceResult(statistic=array([  1.05408049e+03,   6.30832196e+02,   7.02987722e+01,
           9.17326057e+00,   1.56193724e+01,   3.36275580e+01,
           6.16076398e+02,   1.50373806e+02,   2.94802183e+01,
           2.65321965e+02,   1.00900409e+01,   3.06515689e+02,
           1.38828104e+02,   3.68894952e+02,   1.92873124e+02,
           5.67564802e+02,   2.36092769e+02,   1.77298772e+03,
           3.55388267e+03,   6.42013643e+02,   1.55858117e+02,
           1.22783083e+02,   1.36425648e-03,   2.47579809e+02,
           2.36092769e+02,   7.02987722e+01,   1.23124147e+01,
           6.10587995e+02,   2.75088677e+01,   2.76261937e+02,
           2.00121419e+02,   4.97702592e+02,   2.01167804e+02,
           1.26909959e+02,   2.60530696e+02,   6.66316508e+01,
           2.15019100e+02]), pvalue=array([ nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
          nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
          nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
          nan,  nan,  nan,  nan]))
  </code></pre>