--

Networkx is the worst choice. Just look at benchmarks https://www.timlrx.com/blog/benchmark-of-popular-graph-network-packages-v2

The simplest way to save is a simple node list and edge list in CSV. It's not the best in terms of disc usage, but the most universal, and almost everything can handle it. Python package of my choice is Igraph, but not because it's the best, but because I worked a lot with it and it fast enough for me. My graph fellows say that graphtool is good too. But if you just want to make visualization, maybe you don't need to use any python graph package, but just save file to CSV using pandas and then put it in some of the mentioned tools. Some of them handle graphml and gepx. It's possible to convert into them from csv.

--

--