I am trying to plot a column as the x axis and another column as the y axis but get the above error. I can see the data and can access it using head() or sum().
Here is the code itself:
dengue_by_region = ph_dengue_cases2016_2020.groupby('Region')
dengue_by_region.head()
x = dengue_by_region['Dengue_Cases'].sum()
y = dengue_by_region['Region']
plt.bar(x, y)
I am unsure why I am unable to using x on the x axis and y on the y without it bringing up the error. Any help would be very much appreciated. I am using Jupyter Notebook if that helps.
