Persisting the network
I want to persist this network so that we can use it in later chapters without having to go through all of this work again. We will use this network quite a lot in this book:
outfile = r'C:\blah\blah\blah\networks\alice\edgelist_alice_cleaned.csv' final_network_df = nx.to_pandas_edgelist(G) final_network_df.to_csv(outfile, header=True, index=False)
I’m using Microsoft Windows. Your outfile path may look different.