How to Cluster Data using a set of variables?

I have a pandas DataFrame that holds the data for some objects. The position for some parts of the object is given column wise as following:

Left, Top, Right, Bottom

How can I cluster the objects based these attributes? Is there a clustering algorithm/technique that you can recommend me?

Since there isn’t proper information available on what sort of data do you have, I’d assume that each of these columns mention how far the object is from left, right etc.

In such case it’ll be suitable to use any geospatial clustering technique. Popular algorithms like K-means, which uses euclidean distance, or nearest neighbour can work well for this approach as they can use distance between objects to get back clusters of locations that are close to each other.

However, it may also depend on the type of problem you’re solving. You can refer to this article that uses the network approach for geospatial clustering.