试图visticeNetworks的断言
我正在尝试使用Import NetworkX作为NX和Pyvis.network导入网络创建网络连接图。该代码如下所示,
rules = pd.read_csv("EDMV.conexiones_neg.20220613.apriori.base2.txt", sep = "|")
G = nx.from_pandas_edgelist(rules, source = "desc.x", target = "desc.y", edge_attr = "lift")
net = Network(notebook = True, width=1000, height=600)
net.from_nx(G)
当我运行结局线时,我会得到一个断言。
有什么想法导致错误?
I'm trying to create a network connection graph with import networkx as nx and from pyvis.network import Network. The code is as follows
rules = pd.read_csv("EDMV.conexiones_neg.20220613.apriori.base2.txt", sep = "|")
G = nx.from_pandas_edgelist(rules, source = "desc.x", target = "desc.y", edge_attr = "lift")
net = Network(notebook = True, width=1000, height=600)
net.from_nx(G)
When I run the finale line I get an AssertionError.
Any ideas what is causing error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要做的就是确保您的节点标签类型是整数或字符串(在您的情况下“ desc.x”和“ desc.y”列)。
尝试以下内容:
All you need to do is to make sure that your nodes label type are either integer or string (in your case 'desc.x' and 'desc.y' columns).
try the following: