Skip to content
Advertisement

Create Python graphviz Digraph with Pandas

I am trying to make a diagram tree in graphviz.Digraph, I am using Pandas dataframe. By the below query, I am getting the processid’s and their dependents id’s in a form of a dictionary

JavaScript

But I want the data in below format:

JavaScript

Can someone please help me return pandas dataframe output in such format?

Advertisement

Answer

Are you wanting this:

JavaScript

Output:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement