a = pd.DataFrame([[1, 2, 3], [3, 1, 1], [4, 0, 2]], index=node_names,
    columns=node_names)
A = a.values
g = igraph.Graph.Adjacency((A > 0).tolist())
g.es['weight'] = A[A.nonzero()]
g.vs['label'] = node_names
igraph Graph from numpy or pandas adjacency matrix