Created
August 27, 2021 02:33
-
-
Save khuyentran1401/7d5a18c5c9515e8ec6aa240d00e009e0 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
# Define influencers | |
influencers = num_friends[ | |
num_friends["friends_have_more_friends"] == False | |
].person_id.tolist() | |
# Mark the influencers red | |
net.nodes = [ | |
{"id": node["id"], "label": node["id"], "shape": "dot", "color": "#eb4034"} | |
if node["id"] in influencers | |
else node | |
for node in net.nodes | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment