In [ ]:
    
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from scipy.cluster.hierarchy import dendrogram, linkage
%matplotlib inline
    
In [ ]:
    
states = pd.read_csv('~/Desktop/ClusterData.csv')
list(states.columns.values)
    
In [ ]:
    
st = states[states.columns[2:]]
st.index = states.ix[:,1]
    
In [ ]:
    
Z = linkage(st, 'ward')
    
In [ ]:
    
plt.figure(figsize = (25, 10))
plt.title('Cluster with All Searches and Personality')
plt.ylabel('distance')
dendrogram(
    Z,
    labels = st.index,
    leaf_rotation = 0.,
    leaf_font_size = 18.,
)
plt.show()
    
In [ ]: