How to extract random nodes from networkx graph? I have a map in the form of a networkx graph, and I have to extract 5 random nodes from it and get the data associated with each of them and their edges. I suppose I can do this with "np.random.choice", but I still canβt get any results.
source
share