I'm converting a pandas dataframe to a gt graph. I can successfully add edges with accompany attributes from the dataframe, but the network I'm building has its own internal vertex and edge IDs that I need to be able to reference. I can store the edge IDs when adding edges with the eprops= argument. However, it's unclear how I can associate my vertex IDs to the vertices. Is there an established way to do this?

The confusion I have is knowing which vertex in the gt graph I should associate back to the vertices in my input data. I suppose I could read through edges and compare the edge ID in the gt graph with my source data and then assign the correct information to the source and target nodes, but that seems inefficient. Is there something I'm missing?

My dataframe is in the format

1        3        1
1        4        2
23      15      32

Thanks for any help.