Skip to content
Advertisement

Generate BarGraph from DataFrame

So I have a generated a Disease_Data dataframe that has 2 columns, Location and Data (see below).

JavaScript

I wanted to generate a bar graph like below:

enter image description here

However, when I tried the code below, things did not work and gave an error: KeyError: ‘Location’

JavaScript

Please help, thank you

Advertisement

Answer

  • Just plot the dataframe
JavaScript

enter image description here

Advertisement