title: plot kmeans clustering on more than 2 dimensional data
body: <p>I have a dataset with 6 columns and after using KMEANs I need to visualize the plot after clustering. I have six clusters. how can I do it?
  this my Kmeans clustering code:</p>
  <pre><code>from sklearn.preprocessing import StandardScaler
  scaler = StandardScaler()
  scaled_features = scaler.fit_transform(psnr_bitrate)
  kmeans = KMeans(init=&quot;random&quot;,n_clusters=6,n_init=10,max_iter=300,random_state=42)
  kmeans.fit(scaled_features)
  y_kmeans = kmeans.predict(scaled_features)
  </code></pre>
  <p>I found another post on this link:
  <a href="https://stackoverflow.com/questions/46844654/how-to-visualize-kmeans-clustering-on-multidimensional-data">How to visualize kmeans clustering on multidimensional data</a>
  but I could not understand the solution, because I do not know what is</p>
  <pre><code>cluster
  </code></pre>
  <p>in that code?!</p>
  <p>I used the following code:</p>
  <pre><code>from sklearn.preprocessing import StandardScaler
  from sklearn import cluster
  
  scaler = StandardScaler()
  scaled_features = scaler.fit_transform(psnr_bitrate)
  kmeans = KMeans(init=&quot;random&quot;,n_clusters=6,n_init=10,max_iter=300,random_state=42)
  kmeans.fit(scaled_features)
  y_kmeans = kmeans.predict(scaled_features)
  scaled_features['cluster'] = y_kmeans
  pd.tools.plotting.parallel_coordinates(scaled_features, 'cluster')
  </code></pre>
  <p>and it produces this error:</p>
  <pre><code>Traceback (most recent call last):
  
    File &quot;&lt;ipython-input-77-2e66d8a57100&gt;&quot;, line 7, in &lt;module&gt;
      scaled_features['cluster'] = y_kmeans
  
  IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
  </code></pre>
  <p>my input data for clustering is a numpy variable like this:</p>
  <pre><code>31.764833 35.632833 38.088500 39.877250 41.331917 42.923750
  29.832750 34.567500 37.527417 39.621000 41.412583 43.023917
  36.777167 41.151333 44.122500 46.237167 47.879083 49.832250
  46.871500 52.006333 54.784583 57.099417 58.767833 60.674667
  </code></pre>
  <p>it has 6 columns and 1301 rows. but my columns does not have name.</p>