import matplotlib.pyplot as plt
import networkx as nx
# store pairs to a list of tuples
tuples = [tuple(x) for x in df.values]
# set up a graph and show it
G = nx.DiGraph()
G.add_edges_from(tuples)
nx.draw_networkx(G)
plt.xticks([], [])
plt.yticks([], [])
plt.show()