Re: [graph-tool] TypeError while using add_edge_list

2018-07-18 Thread ashutosh
I got the problem. Graph Tool by default accepts only vertex objects or int(index) values on edge list and hence either I pass on vertex object list or keep the options* hashed=True and string_vals=True* in the add_edge_list option. The problem is resolved now. Thank you -- Sent from:

Re: [graph-tool] TypeError while using add_edge_list

2018-07-18 Thread ashutosh
sampleFile.tab above is the sample file. and below is the code that produces the error as i mentioned before import pandas as pd import graph_tool.all as gtx df =

Re: [graph-tool] TypeError while using add_edge_list

2018-07-18 Thread Alexandre Hannud Abdo
Tiny typo, the first argument is `hashed=True`. On Wed, Jul 18, 2018 at 1:18 PM, Alexandre Hannud Abdo wrote: > Ni! Hi ashu, > > Please, always try to *read errors carefully* and consult the > documentation. Not to mention, provide self-contained examples. > > Python is throwing a "TypeError"

Re: [graph-tool] TypeError while using add_edge_list

2018-07-18 Thread Alexandre Hannud Abdo
Ni! Hi ashu, Please, always try to *read errors carefully* and consult the documentation. Not to mention, provide self-contained examples. Python is throwing a "TypeError" and telling you it expects an integer ('unsigned long', the C++ type for vertex indices) while you are passing it a string

[graph-tool] TypeError while using add_edge_list

2018-07-18 Thread ashutosh
Hi, I'm trying to convert two columns of my pandas dataframe into network using them as edge list. A similar query was posted in StackOverflow but with different problem and it didn't help me.