text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import scipy.cluster.hierarchy as sch

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)

import scipy.cluster.hierarchy as sch
den = sch.dendrogram(sch.linkage(X, method='ward'))
plt.title('Dendrogram')
plt.xlabel('Number of courses')
plt.ylabel('Time spent to study')
plt.show()