Working with Networks in NetworkX

The basic features of NetworkX are contained in several Python classes that represent different types of networks. In particular, this chapter discusses Graph, DiGraph, MultiGraph, and MultiDiGraph. These classes can be used to represent, analyze, and visualize most networks. In this chapter, you will learn to use these classes to work with real-world network data in NetworkX. The code examples in this and future chapters will assume that you have already imported the networkx package.

In this chapter, we will cover the following topics:

  • The Graph class: Understand the properties of undirected networks and how they are represented using the NetworkX Graph class.
  • Attributes: How to associate data with nodes ...

Get Network Science with Python and NetworkX Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.