[英]convert csv File to GML using python or other suggestions
我有一個數據集,其中包含稱為調用列的網絡數據,該數據集由表示兩列之間連接的兩列組成。
Since I'm using igraph in Python I would like to convert this file to GML format to use it here: https://live.yworks.com/demos/layout/layoutstyles/index.html Is there any way to do this?
作為對想看看我嘗試了什么的人的回應:在此處輸入圖像描述我使用了 yworks 命題
要將邊緣列表文件 (.edges) 轉換為 gml 文件,請嘗試下面給出的代碼。 我使用了networkx package。
import networkx as nx
G= nx.read_edgelist('414.edges') # load your edgelist file
nx.write_gml(G, "414.gml") # gml file will be created
欲了解更多信息,請訪問https://networkx.org/documentation/stable/reference/readwrite/gml.html#module-networkx.readwrite.gml
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.