Python igraph 中 R igraph graph_from_data_frame() 函数的等价物?

Equivalent of R igraph graph_from_data_frame() function in Python igraph?

在 Python igraph 中是否有与此 igraph R function 等效的内容?

graph_from_data_frame(d, directed = TRUE, vertices = NULL)

This function creates an igraph graph from one or two data frames containing the (symbolic) edge list and edge/vertex attributes.

Python 没有数据框,因此没有直接等效项。最接近的等价物可能是 Graph.DictList, which creates a graph from a list of dictionaries, or Graph.TupleList,这与元组列表相同。