学习过程中,运行时报错:
AttributeError: module 'networkx' has no attribute 'from_pandas_edgelist'
最终升级networkx包问题解决,代码改为:
G = nx.from_pandas_dataframe(edges, source='sources', target='targets', edge_attr='weights')
问题原因:版本问题,from_pandas_edgelist在新版本没了,没了!!!
版本的问题一直是一个痛!!!