pygraphistry
pygraphistry copied to clipboard
[FEA] enriching helpers such as prune nodes to edges
Is your feature request related to a problem? Please describe.
When enriching a graph, there's a lot of wrangling, and can lead to funny workaround
ex: if a superset of nodes are used, the nodes become useless singletons
Describe the solution you'd like
g.edges(df1, 's', 'd').nodes(df2, 'n').enrich_nodes(labels_df, 'n').plot() # only enrich for nodes in df2
g.edges(df1, 's', 'd').enrich_nodes(labels_df).plot(). # only enrich for nodes in df1 (synthesize nodes)
Likely prefer to do it locally
Describe alternatives you've considered
- Option
g.nodes(labels_df, 'n', mode='enrich') - Push to server vs do on client
Additional context Add any other context or screenshots about the feature request here.