NetworkX

Previous topic

networkx.convert.from_dict_of_dicts

Next topic

networkx.convert.from_dict_of_lists

networkx.convert.to_dict_of_lists

to_dict_of_lists(G, nodelist=None)

Return adjacency representation of graph as a dictionary of lists

Parameters:

G : graph

A NetworkX graph

nodelist : list

Use only nodes specified in nodelist

Notes

Completely ignores edge data for MultiGraph and MultiDiGraph.