title: How to add k-means predicted clusters in a column to a dataframe in Python
body: <p>I have a question about kmeans clustering in python.</p>
  
  <p>So I did the analysis that way:</p>
  
  <pre><code>from sklearn.cluster import KMeans
  
  km = KMeans(n_clusters=12, random_state=1)
  new = data._get_numeric_data().dropna(axis=1)
  km.fit(new)
  predict=km.predict(new)
  </code></pre>
  
  <p>How can I add the column with cluster results to my first dataframe "data" as an additional column? Thanks!</p>