Created
May 24, 2020 13:20
-
-
Save manekgarg/d6510cdd3ebcc991d2bcd2558ba57337 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