-1

I have a data set that show all the countries confirmed covid cases per day for 7 months.

Data Frame Head

How do I create a bar chart that shows just the countries name and its overall cases in the 7 month period. I am trying to groupby "Country/Region" but I dont know how to combine each countries different days into one total so I can plot the two.

covid_stats_country =covid_stats.groupby("Country/Region").sum()

enter image description here

covid_stats.plt.plot(x="Country/Region",y="Confirmed")

1 Answers1

0

Use your grouped dataframe for the plot:

>>> covid_stats_country["Confirmed"].plot.bar()

bar chart

not_speshal
  • 22,093
  • 2
  • 15
  • 30