Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created January 31, 2020 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/f013153a06cae055bba3b0dc511bd52d to your computer and use it in GitHub Desktop.
Save prateekjoshi565/f013153a06cae055bba3b0dc511bd52d to your computer and use it in GitHub Desktop.
# construct graph
G = nx.from_pandas_edgelist(team_df, "follower", "lead", ['performance'], create_using=nx.MultiDiGraph())
# get edge weights
_, wt = zip(*nx.get_edge_attributes(G, 'performance').items())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment