Going through the source code for the @classmethod def from_networkx the argument nodes doesn’t appear to be a data frame because:
a) if you use a dataframe the if node: boolean calls throw an error (would have to use instead ~nodes.empty)
b) refers to nodes.kdims which means it’s a holoviews object?
The docs don’t explain except (possibly) a reference that you can supply additional node information. In fact, it’s not apparent to me where in the method that the data is extracted from the networkx graph object.
In the bigger picture: I’m just trying to color nodes by type. The type is a node attribute in my networkx graph but that info doesn’t get extracted by the function and so the nodes color is transparent.
I actually took the question to the ‘issues’ in the holoview repo. Try what you did but with attributes also on the edges. In my case, if the edges have no attributes the coloring works. If the edges do have attributes, then the coloring doesn’t work. My original thought was it might have something to do with the ‘nodes’ attribute but having looked at the code and in the absence of docs, I thought that might be the source of the problem.