Created
March 6, 2020 14:11
-
-
Save mashhadazam/1eb9a11ac8be013c2863f054528b419d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TotalCasesCountry=CountryConsolidated.max(level=0)['Total Confirmed Cases'].reset_index().set_index('Country/Region') | |
TotalCasesCountry=TotalCasesCountry.sort_values(by='Total Confirmed Cases',ascending=False) | |
TotalCasesCountryexclChina=TotalCasesCountry[~TotalCasesCountry.index.isin(['Mainland China','Others'])] | |
Top10countriesbycasesexclChina=TotalCasesCountryexclChina.head(10) | |
TotalCasesCountrytop10=TotalCasesCountry.head(10) | |
fig = go.Figure(go.Bar(x=Top10countriesbycasesexclChina.index, y=Top10countriesbycasesexclChina['Total Confirmed Cases'], | |
text=Top10countriesbycasesexclChina['Total Confirmed Cases'], | |
textposition='outside')) | |
fig.update_layout(title_text='Top 10 Countries by Total Confirmed Cases Excluding China') | |
fig.update_yaxes(showticklabels=False) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment