See:
https://graph-tool.skewed.de/static/doc/graph_tool.html#graph_tool.Graph.reindex_edges
Note, however, that the indexes will be from 0 to E-1, not 1 to E.
Best, Tiago