I'm trying to create a pie chart in plotly. I have dataframe that is similar to this:
>>> land_cover count
1 Closed (>40%) broadleaved evergreen or semidec... 1102
2 Closed broadleaved forest or shrubland permane... 22
3 Closed grassland 213
4 Closed to open broadleaved decidous shrubland 3
5 Closed to open broadleaved evergreen or semid... 3480
6 Closed to open herbaceousvegetation (or lichen... 501
7 Closed to open shrubland 9200
8 Closedto open broadleavedforest regularly floo... 89
I'm trying to create the chart with plotly like this:
import plotly.express as px
import plotly.graph_objects as go
fig = px.pie(df, values='count', names='land_cover', title='land cover')
fig.update_layout(title_x=0.48)
fig.show()
But I get a chart that only shows the legend without the pie chart itself.
I have created other pie charts exactly with this script so I don't find the reason why here it doesn't generate the pie chart properly.
What can be the cause for this?

