使用Excel / SheetsclosuresZoteronetworking图

我试图从我的Zotero书目中build立一个作者networking图。 我已经将数据库导出到.csv,并且需要在使用Gephi,Cytoscape等可视化软件之前进行编辑。

所以,我认为数据需要作为:

Column 1 -> Author X Column 2 —> All authors who have worked with author X 

这些数据将来自我目前的“作者”专栏,目前其格式如下:

 Row1: Author X; Author Y; Author Z Row2: Author A; Author B; Author C Row3: Author X; Author Z; Author B ... 

我如何处理这些数据?

以下是一些Pythontypes的伪代码,用于说明如何将当前的格式转换为指定的格式。

 srctbl # source table dsttbl # destination table for row in srctbl: authors = row.column("Authors").split("; ") for author in authors: if author not in dsttbl.column(1): dsttbl.column(1).addrow(author) for author in authors: peers = dsttbl.row(author).column(2).split("; ") for coauthor in authors: if coauthor is not author and coauthor not in peers: dsttbl.row(author).column(2).append(coauthor + "; ")