我正在做一些推特分析,我想使用pySankey包来可视化我的结果。但是当我尝试使用这个包时,我得到了以下错误,它源于包本身。有人知道怎么解决这个问题吗?我使用的是python 3
() 6 7 sankey.sankey中的推特回溯(最近一次调用)(df‘State’,df‘sankey.sankey’,aspect=20,colorDict=colorDict,->8 fontsize=1,figure_name=“推特情绪-每个州的主题”9)
sankey中的/anaconda3/lib/python3.6/site-packages/pySankey/sankey.py (左、右、leftWeight、rightWeight、colorDict、leftLabels、rightLabels、aspect、rightColor、fontsize、figure_name、closePlot)
UnboundLocalError:赋值前引用的局部变量“”topEdge“”
发布于 2019-08-04 12:54:26
您可能想尝试一下https://github.com/ricklupton/ipysankeywidget
附注:它提供了交互式jupyter功能,等等。

另一个不错的sankey python库是:https://github.com/ricklupton/floweaver
https://stackoverflow.com/questions/52609582
复制相似问题