我想了解为什么会出现此错误:TypeError: unhashable type: 'set',当我运行此代码时import matplotlib.pyplot as pltimport networkx as nxdef my_function(file): file = file.explode('Two') G = nx.DiGraph() nx.add_path(G, file['One']) nx.add_path(G, file['Two']) nx.draw_networkx(G) plt.show() return使用此数据集: One Twowine {wine, beer, wine, water}table {table, oven, chair, kitchen} car {cars, bike, bike}我没有使用set(nor frozenset),但我认为问题可能出在括号中。
添加回答
举报
0/150
提交
取消