How to solve this issue? It keeps giving me the error 'Graph' object has no attribute '_node'. Is this due to the networkX version issue?
import networkx as nx
import pandas as pd
G = nx.read_gpickle('major_us_cities')
G.nodes(data=True)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-af9b96288895> in <module>
----> 1 G.nodes(data=True)
/usr/local/anaconda3/lib/python3.8/site-packages/networkx/classes/graph.py in nodes(self)
752
753 """
--> 754 nodes = NodeView(self)
755 # Lazy View creation: overload the (class) property on the instance
756 # Then future G.nodes use the existing View
/usr/local/anaconda3/lib/python3.8/site-packages/networkx/classes/reportviews.py in __init__(self, graph)
166
167 def __init__(self, graph):
--> 168 self._nodes = graph._node
169
170 # Mapping methods
AttributeError: 'Graph' object has no attribute '_node'