我想了解為什么會出現此錯誤: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
提交
取消