text: import pandas as pd
  from sklearn.cluster import KMeans
  
  dataset = pd.read_csv('https://storage.googleapis.com/dqlab-dataset/pythonTutorial/mall_customers.csv')
  X = dataset[['annual_income', 'spending_score']]
  
  cluster_model = KMeans(n_clusters=5, random_state=24)
  labels = cluster_model.fit_predict(X)
  
  #import library
  import matplotlib.pyplot as plt
  
  #convert dataframe to array
  X = X.values
  #Separate X to xs and ys --> use for chart axis
  xs = X[:, 0]
  ys = X[:, 1]
  # Make a scatter plot of xs and ys, using labels to define the colors
  plt.scatter(xs, ys, c=labels, alpha=0.5)
  
  # Assign the cluster centers: centroids
  centroids = cluster_model.cluster_centers_
  # Assign the columns of centroids: centroids_x, centroids_y
  centroids_x = centroids[:,0]
  centroids_y = centroids[:,1]
  # Make a scatter plot of centroids_x and centroids_y
  plt.scatter(centroids_x, centroids_y, marker='D', s=50)
  plt.title('K Means Clustering', fontsize=20)
  plt.xlabel('Annual Income')
  plt.ylabel('Spending Score')
  plt.show()