Plotly Sunburst generates an error

I am getting the following error when trying to generate a Sunburst plot:
AttributeError: 'DataFrame' object has no attribute 'append'

To check it, I tried to reproduce the example that appears on Plotly documentation:

import plotly.express as px
import numpy as np
df = px.data.gapminder().query("year == 2007")
fig = px.sunburst(df, path=['continent', 'country'], values='pop',
                  color='lifeExp', hover_data=['iso_alpha'],
                  color_continuous_scale='RdBu',
                  color_continuous_midpoint=np.average(df['lifeExp'], weights=df['pop']))
fig.show()

And I am getting the same error.
I believe this issue is related to Panda’s versions. I upgraded to the latest Pandas/Numpy/Plotly version, but I am still getting the same issue.

My versions are:
pandas 2.2.2
plotly 5.24.0
numpy 2.0.2

Any suggestions?

I think this may be due to the fact that append is obsolete in pandas 2.0.0 over, although I have not checked the plotly source.

Yes. I believe this is the case as well. Does this mean that Plotly Sunburst needs an update?