Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clusters
#1
Hello, please can you help me with creating clusters. I have one column x with number(1,2,6,8,4,7,5,9,8,2,4,9,3). I would like to create three clusters (0-3,4-6,7-9). Can you help me. How can I create these clusters in python. And i would like to create new column with these clusters.

for example

x y
1 0-3
2 0-3
6 4-6


Thank you so much for yours answers.
Reply
#2
what have you tried so far?
Please show your code
Reply
#3
I do not try anything, because i did not find anything about it , how it is do.
Reply
#4
Come on, we aren't here to do the work for you. You must at least have some thoughts on how to break the problem down.
Reply
#5
i know that we are not here to do the work for me, but i did not find anything about this in the internet or forum. I know what i want but i do not know how i can do it.
Reply
#6
You won't always find code for the very specific thing you want to do, so it's critical to be able to solve problems. Imagine you had no computer and were given this data. How would you produce the result you want?
dawid294 likes this post
Reply
#7
There are lots of references to this,
google: 'create clusters from tuple python'
dawid294 likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  seeking simple|clean|pythonic way to capture {1,} numeric clusters NetPCDoc 6 3,048 Jun-10-2021, 05:14 PM
Last Post: NetPCDoc
  Exotic stats problem ; mode, fuzzy clusters, etc amyvaulhausen 5 3,805 Aug-06-2018, 04:10 PM
Last Post: Vysero

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020