def write_edge_attributes(graph, filepath, format='networkx', with_data=False):
"""
Utility function to let you write an edgelist
"""
print "Writing edgelist to file..."
if format == 'networkx':
nx.write_edgelist(graph, filepath, data=with_data)
else:
print "generate csv"
print "Done"
评论列表
文章目录