2021年1月3日星期日

Convert Node ID for Node Indexing

I have a dataframe like this:

OwnerID| Subowner ID |    91    |    5        |       91    |    2        |      91    |    6        |      88    |    91       |      88    |    20       |     

I want to convert it into a node index for igraph tree plotting. Something like this:

OwnerID| Subowner ID | Node_Index   91    |    5        |    (1, 3)   91    |    2        |    (1, 4)   91    |    6        |    (1, 5)   88    |    91       |    (0, 1)   88    |    20       |    (0, 2)   
https://stackoverflow.com/questions/65556893/convert-node-id-for-node-indexing January 04, 2021 at 10:12AM

没有评论:

发表评论