Skip to content

Instantly share code, notes, and snippets.

@tomasonjo
Created May 19, 2022 13:34
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 tomasonjo/019cc6886c8d73438cc5da9e9f326402 to your computer and use it in GitHub Desktop.
Save tomasonjo/019cc6886c8d73438cc5da9e9f326402 to your computer and use it in GitHub Desktop.
# Get user ids
graph_features['user_id'] = [el.get('guid') for el in graph_features['node_object']]
# Merge to original df
df = df.merge(graph_features[['user_id', 'componentSize', 'part_of_community', 'pagerank', 'closeness']], on='user_id')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment