from pandas import DataFrame
from sklearn.cluster import AgglomerativeClustering

Data = {
	'x': [35,34,32,37,33,33,31,27,35,34,62,54,57,47,50,57,59,52,61,47,50,48,39,40,45,47,39,44,50,48],
        'y': [79,54,52,77,59,74,73,57,69,75,51,32,40,47,53,36,35,58,59,50,23,22,13,14,22,7,29,25,9,8]
       }
  
df = DataFrame(Data,columns=['x','y'])

cluster = AgglomerativeClustering(n_clusters=3, affinity='euclidean', linkage='ward')  
cluster.fit_predict(df)  

clusters = cluster.labels_
i = 0
print("Cluster\t X\t Y")
for row in df.iterrows():
   print(clusters[i], '\t', row[1]['x'], '\t', row[1]['y'])
   i = i + 1