This documents the development version of NetworkX. Documentation for the current release can be found here.
Read graph in YAML format from path.
YAML is a data serialization format designed for human readability and interaction with scripting languages .
- pathfile or string
File or filename to read. Filenames ending in .gz or .bz2 will be uncompressed.
- GNetworkX graph
Deprecated since version 2.6.
>>> G = nx.path_graph(4) >>> nx.write_yaml(G, "test.yaml") >>> G = nx.read_yaml("test.yaml")