Created
May 24, 2020 13:20
-
-
Save manekgarg/ae6fdb0437d0d40735282f6fe123100c 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
# Attribute enrichment of the nodes | |
node_attr = pd.read_csv('/content/quakers_nodelist.csv', index_col = 'Name') | |
node_attr | |
# Add the atribute to the graph G | |
node_attr_d = node_attr.to_dict(orient = 'index') | |
nx.classes.function.set_node_attributes(G, node_attr_d) | |
nx.get_node_attributes(G, 'age') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment