Created
September 7, 2019 16:59
-
-
Save julian-west/2b3800b324eeeb2d339f097f6dd7f759 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create undirected graph with weights corresponding to the correlation magnitude | |
G0 = nx.from_pandas_edgelist(edges, 'asset_1', 'asset_2', edge_attr=['correlation']) | |
#print out the graph info | |
#check number of nodes and degrees are as expected (all should have degree = 38, i.e. average degree = 38) | |
print(nx.info(G0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment