NameError: global name 'dot_parser' is not defined
问题 I was playing with the decision tree algorithm and trying to plot the tree. However the IDE reported following error: Couldn't import dot_parser, loading of dot files will not be possible. <class 'pandas.core.frame.DataFrame'> Traceback (most recent call last): File "C:/Users/s152730/Desktop/exe1.py", line 70, in <module> graph = pydot.graph_from_dot_data(test.getvalue()) File "C:\Python27\lib\site-packages\pydot.py", line 220, in graph_from_dot_data return dot_parser.parse_dot_data(data)