Arbitrary vertex indices in an edge lsit

I have a dataset in which the indeces of the vertices are arbitrary (i.e. the highest index is much higher than the number of vertices)
If I use the add_edge_list( ) function to construct the graph there are vertices for each index between 0 and the highest occurring index in my dataset. Is there any way to avoid all these unnecessary vertices?

Thank you very much

attachment.html (959 Bytes)

This is possible, but only in the version in git. You would do simply
g.add_edge_list(edges, hashed=True).

In the current version, you have to do the mapping yourself.

Best,
Tiago