cdlib.readwrite.write_community_csv¶
-
write_community_csv
(communities, path, delimiter=', ', zip=False)¶ Save community structure to comma separated value (csv) file.
Parameters: - communities – a NodeClustering object
- path – output filename
- delimiter – column delimiter
- zip – wheter to copress the csv, default False
Example: >>> import networkx as nx >>> from cdlib import algorithms, readwrite >>> g = nx.karate_club_graph() >>> coms = algorithms.louvain(g) >>> readwrite.write_community_csv(coms, "communities.csv", ",")