How to Solve NameError: name 'dendrogram' is not defined -- scipy
Solution: Import the 'dendrogram' module
To Solve the error, add the following line to the top of your code.
from scipy import dendrogram
For more information:
Python scipy dendrogram