title: Python Relating k-means cluster to instance
body: <p>I've read the docs 
  <a href="http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html" rel="nofollow">here</a> as well as looking at <a href="http://fromdatawithlove.thegovans.us/2013/05/clustering-using-scikit-learn.html" rel="nofollow">this</a> tutorial, but I am still missing something fundamental about using K-means in scikit-learn:</p>
  
  <p>Say I have a dataset as such:</p>
  
  <pre><code>|UserName| Variable1 | Variable2 | Variable3 |  Cluster |
  |  bob   |    1      |     3     |    7      |          |
  |  joe   |    2      |     4     |    8      |          |
  |  bill  |    1      |     6     |    4      |          |
  </code></pre>
  
  <p>Since K-means takes a numpy array I have to strip out the username and just use the numerical variables. But, after the clusters have been created how do I relate them back to each individual user for further analysis. I.e how would I fill the "Cluster" column with the corresponding cluster number?</p>