text_plain_output_1.png
from sklearn.cluster import AgglomerativeClustering

import pandas as pd

dataset = pd.read_csv('/kaggle/input/student-marks-dataset/Student_Marks.csv')
dataset

dataset.isnull().sum()

dataset.nunique()

X = dataset.iloc[:, 1:3].values.round(2)

from sklearn.cluster import AgglomerativeClustering
hc = AgglomerativeClustering(n_clusters=5, affinity='euclidean', linkage='ward')
y_hc = hc.fit_predict(X)
print('setup complete')