I am trying to make a stacked bar plot in plotly using webscraping. However, I keep getting this error: "hasattr(): attribute name must be string". I think it might be the part:"gdp['IMF[1][13]', 'Estimate']" that is causing the error.
This is what the dataframe looks like: enter image description here
import plotly.express as px
ERROR -> fig = px.bar(gdp, x = gdp['UN Region'], y = gdp['IMF[1][13]', 'Estimate'], color = gdp['Country/Territory'])
fig.show()