簡體   English   中英

使用 python 或其他建議將 csv 文件轉換為 GML

[英]convert csv File to GML using python or other suggestions

我有一個數據集,其中包含稱為調用列的網絡數據,該數據集由表示兩列之間連接的兩列組成。

可以從以下位置訪問數據集: https://docs.google.com/spreadsheets/d/1dViBlP1TP3qFLn6XFWPfsH4R0Y7VVIns/edit?usp=sharing&ouid=111642513965282802880&rtpof=true&sd=true

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM