Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9182673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:36:55+00:00 2026-06-17T18:36:55+00:00

What is the edgelist format accepted by igraph for import into python? What should

  • 0

What is the edgelist format accepted by igraph for import into python? What should the textfile that contains my weighted edges look like?

I’ve used igraph with R before, but don’t have a working R installation on the machine I need to use—so I’m stuck in python.

I have an egelist.txt something like this:

123123, 321321, 1
222222, 333333, 2
123123, 333333, 3
222222, 321321, 4

…where the values are in (source, target, weight) form.

How would I import this in python? Or should I reformat my input?

I’m tentatively trying

import igraph

g = igraph.Graph.Read_Edgelist()

I can’t tell how to set how to tell the import statement what to expect the order of my columns is, and my understanding from the documentation (http://hal.elte.hu/~nepusz/development/igraph/tutorial/tutorial.html) is that this will assume I have 321,321 nodes in play, rather than taking “321321” as a tagged ID for the node.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:36:57+00:00Added an answer on June 17, 2026 at 6:36 pm

    Get rid of all the commas in your file (i.e. use only whitespace as the separator) and then use Graph.Read_Ncol. This should do the trick. The numeric IDs in your files will be assigned to the name vertex attribute and the edge weights will be stored in the weight edge attribute.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using in R the package 'igraph' and calling the function: graph <- graph.empty(10,directed=FALSE) write.graph(graph,some/path/graph.txt,format=edgelist)
I'm working with igraph for R. My graph is based on an edgelist which
It seems that boost::astar_search doesn't like graphs with boost::listS as the vertex container. typedef
I have some VTK-files, which look like this: # vtk DataFile Version 1.0 Line
I would like to know how to interpret the output of the get.edgelist() command
Consider a plot of a very simple undirected graph produced with igraph. library(igraph) edges
Here's the line that throws this error (x,neighbor) = random.sample(out_edge_list,1)
I'm fairly new to python (and completely new to Python OO), but I'm working
I would like to find a subgraph in Neo4j DB with only strong two
Suppose I have MyEdge and MyEdgeModified , such that MyEdge is the superclass and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.