statewise_cases["Country"] = "Country" print(statewise_cases) fig = px.treemap(statewise_cases, path = ['Country', 'State'], values='Deaths') fig.show()
plotly.graph_objects.Treemap没有关键字参数path。这就是错误消息的意思。它虽然有pathbar,但应该是dict。
plotly.graph_objects.Treemap
path
pathbar