This question already has an answer here:
I am new in python and clustering problem. I need some help for visualization of clustered data.
I have some unlabeled data with 15 attributes and 30161 instances. I took 70% data for clustering and cluster those data into 2 cluster. I also added one column after clustering named 'cluster' and the column '<=50k' was label column. Now I need to plot those data except label column, How can I plot it ? Here's the sample of my code and data.
cols_y = train.columns
X = train[cols_x]
y = train[cols_y]
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.30,random_state=10)
kmeans = KMeans(n_clusters=2)
train["cluster"] = kmeans.fit_predict(train[X_train.columns[0:14]])