# 可以正常输出图形就表示安装成功!
import graphviz
from sklearn import tree
dot_data = tree.export_graphviz(DTC
,out_file = None
,feature_names= data.columns.values[2:] # 特征名字
,class_names=[\'No Purchase\',\'Purchase\'] # 标签名字
,filled=True # 节点的背景颜色
,rounded=True # 小框弧度
)
graph = graphviz.Source(dot_data)
graph