How to create a graph from pandas dataframes?