I am unable to view attributes of a graph read from a GML file in python

108 Views Asked by At

I am trying to use the networkx package to work on a directed graph. The file was read successfully but a lot of the functions do not give any output for it.

import networkx as nx
MyGraph=nx.DiGraph()
MyGraph=nx.read_gml("celegansneural.gml")
MyGraph.degree()

I get the following output:

DiDegreeView({})

similarly for MyGraph.edges() the output I get is []

How do I work with the file?

0

There are 0 best solutions below