title: Plot normal distribution in Python from a .csv file
body: <p>The following script draws the Normal Distribution of a sort of data given.</p>
  
  <pre><code>import numpy as np
  import scipy.stats as stats
  import pylab as pl
  
  h = sorted ([0.9, 0.6, 0.5, 0.73788,...]) #Data that I would like to change
  
  fit = stats.norm.pdf(h, np.mean(h), np.std(h))  
  pl.plot(h,fit,'-o')
  pl.show()    
  </code></pre>
  
  <p>I would like to find how to plot the data taken from a .csv file instead of having to introduce it manually. Suppose the data wanted is in the 2nd column of a given .csv file, the way I know to do something similar to isolate the data is by creating an intermediate file, but maybe this is not even necessary.  </p>
  
  <pre><code>with open('infile.csv','rb') as inf, open('outfile.csv','wb') as outf:
      incsv = csv.reader(inf, delimiter=',')
      outcsv = csv.writer(outf, delimiter=',')
      outcsv.writerows(row[1] in incsv)
  </code></pre>
  
  <p>Anyway, basically my two questions here are,<br>
  - Would I be writing correctly the second column of a .csv into a new .csv file?<br>
  - How could I merge those two scripts so that I can substitute the static data in the first one for the data in a column of a .csv file?   </p>