0

I am getting the TypeError: no numeric data to plot when I try to plot

df_prevalence.plot(kind='barh', x='Percent', y='State', figsize=(15, 12), color='r', title= 'Adults with Serious Thoughts of Suicide in the Unites States by State, 2020')

Data from df_prevalence

  • `State` must be a Series of strings. `df_prevalence.dtypes` will tell you what types your DataFrame contains. – wwii Jun 27 '22 at 15:59
  • Please don't post images of code, data, or Tracebacks. Copy and paste it as text then format it as code (select it and type `ctrl-k`) … [Why should I not upload images of code/data/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question) . [How to make good reproducible pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) – wwii Jun 27 '22 at 16:03

0 Answers0