Is there a function that re-orders vertices while preserving vertex and edge attributes? I am primarily interested in the Python interface, but if there is a function, I’d also like to know its name in C and R.

I could not find one, but this seems like a fairly fundamental operation, so perhaps I missed it.

Example to clarify:

Given a directed graph with vertices 0, 1, 2 and one edge 1 -> 2, permute/rename the vertices as

It is called igraph_permute_vertices(). I think it can also be (ab)used to calculate induced subgraphs or to duplicate vertices and the edges incident on them.

Actually, we could probably just delegate the implementation of igraph_induced_subgraph() to this function if the user asked to create the new graph from scratch.