-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imputing "null" values for missing keys? #170
Comments
Hi Eric, Thank you for this awesome nxviz package. I have a bipartite graph of "technical-tickets" and "teams" (that work on tickets) as nodes. So "Ticket"s and "Team"s have different attributes. When I tried to Color,Order and Group the ticket-nodes based on attributes that absent in Team-nodes, faced issues due to missing keys in Team-nodes. I have overwritten the class methods in my code with below 2-functions. you may verify and update the code as appropriate. Below code helps :
|
Pasting my code again, did not paste properly above.
|
This is a note left for myself or future contributors, and refers to issue #168.
The end-user of
networkx
might not necessarily have every key represented on every node. I being opinionated think this is a bad idea, but I also recognize that there may be use cases where this is necessary.There are two routes for this:
None
value for nodes that don't have an attribute key.The text was updated successfully, but these errors were encountered: