G = nx.DiGraph()
G.add_nodes_from(df.emp_name)
G.nodes()
G.add_node('None')
subset = df[['mgr_name', 'emp_name']]
tuples = [tuple(x) for x in subset.values]
G.add_edges_from(tuples)
G.number_of_edges()
nx.draw_networkx(G)
plt.show()
t = input()
nx.draw_graphviz(G, prog='dot')
plt.show()
Displaying networkx graph with labels