Some Error when creating treemap

Hi I am trying to create a treemap, the cell in jupyter notebook is executed without any errors but I couldn’t able to see the figure.

Sample dataframe -

posts.head()

id views comments category
0 5019 148896 28 Artistic Visualization
1 1416 81374 26 Visualization
2 1416 81374 26 Featured
3 3485 80819 37 Featured
4 3485 80819 37 Mapping

Treemap code used -

import plotly.express as px
fig = px.treemap(data_frame=posts,names =‘category’,values =‘views’,color =‘comments’)
fig.show()

I read the document of the plotly express treemap and it looks like all the arguments are rights to plot the graph but don’t know why is it not showing, I am just getting a blank space.

Can anyone help me with this.

1 Like