NetworkX
2.4
Install
Tutorial
Reference
Introduction
Graph types
Algorithms
Functions
Graph generators
Linear algebra
Converting to and from other data formats
To NetworkX Graph
Dictionaries
Lists
networkx.convert.to_dict_of_lists
networkx.convert.from_dict_of_lists
networkx.convert.to_edgelist
networkx.convert.from_edgelist
Numpy
Scipy
Pandas
Relabeling nodes
Reading and writing graphs
Drawing
Randomness
Exceptions
Utilities
Glossary
Developer Guide
Release Log
License
Credits
Citing
Bibliography
Examples
NetworkX
Docs
»
Reference
»
Converting to and from other data formats
»
networkx.convert.to_edgelist
networkx.convert.to_edgelist
¶
to_edgelist
(
G
,
nodelist=None
)
[source]
¶
Returns a list of edges in the graph.
Parameters:
G
(
graph
) – A NetworkX graph
nodelist
(
list
) – Use only nodes specified in nodelist