Learn practical skills, build real-world projects, and advance your career
import warnings
warnings.filterwarnings('ignore')

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline

# To Scale our data
from sklearn.preprocessing import scale

# To perform KMeans clustering 
from sklearn.cluster import KMeans

# To perform Hierarchical clustering
from scipy.cluster.hierarchy import linkage
from scipy.cluster.hierarchy import dendrogram
from scipy.cluster.hierarchy import cut_tree
df = sns.load_dataset('iris')
df.head()
df['species'].value_counts()
setosa        50
versicolor    50
virginica     50
Name: species, dtype: int64
df.shape
(150, 5)
df.describe(include='all')