Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created February 16, 2021 09:12
Embed
What would you like to do?
kmeans = KMeans(n_clusters=6)
data["Cluster"] = kmeans.fit_predict(data)
data["Cluster"] = data["Cluster"].astype("int")
print(data.head())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment