igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Importing a weighted network from a csv file


From: Ahmed Abdeen Hamed
Subject: [igraph] Importing a weighted network from a csv file
Date: Fri, 6 Feb 2015 16:02:59 -0500

Hello friends,

I have a weighted network stored in a .csv file. I need to import  using a csv.DictReader but also apply the weights in the column to the edges as we import 

reader = csv.DictReader(open("bigram-frequences.csv"), dialect="excel")#bigram-tweets-raw.csv
g = igraph.Graph.DictList(vertices=None, edges=reader, directed=True)

A sample file of the network is attached.

Any help will be much appreciated,

-Ahmed



Attachment: weighted-network-sample.csv
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]