title: write numpy array to CSV with row indices and header
body: <p>I have a numpy array.</p>
  
  <pre><code>values = np.array([14, 21, 13, 56, 12])
  </code></pre>
  
  <p>I want to write <code>values</code> in one column of a CSV file, the row indices in another column, and a header. I found this function:</p>
  
  <pre><code>numpy.savetxt("foo.csv", values, header="Id,Values", delimiter=",")
  </code></pre>
  
  <p>I'm not sure how to add the indices <code>(1, 2, 3, 4, 5)</code>. Also, my header turns out to be <code># Id,Values</code>. I'm not sure where the <code>#</code> came from. This is what I get:</p>
  
  <pre><code># Id,Values
  14
  21
  13
  56
  12
  </code></pre>
  
  <p>I want something like this:</p>
  
  <pre><code>Id,Values
  1,14
  2,21
  3,13
  4,56
  5,12
  </code></pre>