export tree, export_graphviz
clf = tree.DecisionTreeClassifier(max_depth = 5) clf.fit(X_train, y_train) tree.export_graphviz(clf,out_file='tree.png')