Python 在Kaggle上显示了Sunburst图,但同样的代码在笔记本电脑上显示为空白

Python 在Kaggle上显示了Sunburst图,但同样的代码在笔记本电脑上显示为空白,python,jupyter-notebook,sunburst-diagram,Python,Jupyter Notebook,Sunburst Diagram,我在Kaggle网站上创建了一个笔记本,下面的代码向我展示了sunburst的情节: fig = px.sunburst(data_frame=df, path = ["SEVERITYCODE",'WEATHER','COLLISIONTYPE',"SDOT_COLDESC"], color="SEVERITYCODE", color_discrete_sequence=px.colors.qualitative.Pastel, m

我在Kaggle网站上创建了一个笔记本,下面的代码向我展示了sunburst的情节:

fig = px.sunburst(data_frame=df,
path = ["SEVERITYCODE",'WEATHER','COLLISIONTYPE',"SDOT_COLDESC"], 
color="SEVERITYCODE",
color_discrete_sequence=px.colors.qualitative.Pastel,
maxdepth=-1,              
branchvalues="total", 
title="Severity, Weather, Collision",
)
fig.update_traces(textinfo='label+percent entry')
fig.update_layout(margin=dict(t=10, b=10, r=50, l=50), width=500, height=500)
fig.show()
但是,如果我从Kaggle网站下载ipynb文件并在我的笔记本电脑(JupyterLab)上运行,它会显示一个巨大的空白空白,没有绘图

有什么想法吗?谢谢