-
-
Save amankharwal/30c3ad9055b614b0417e7110ec7a987f 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
life_year = life_expectancy.groupby(by = ['Year', 'Status']).mean().reset_index() | |
Developed = life_year.loc[life_year['Status'] == 'Developed',:] | |
Developing = life_year.loc[life_year['Status'] == 'Developing',:] | |
fig1 = go.Figure() | |
for template in ["plotly_dark"]: | |
fig1.add_trace(go.Scatter(x=Developing['Year'], y=Developing['winz_Life_expectancy'], | |
mode='lines', | |
name='Developing', | |
marker_color='#f075c2')) | |
fig1.add_trace(go.Scatter(x=Developed['Year'], y=Developed['winz_Life_expectancy'], | |
mode='lines', | |
name='Developed', | |
marker_color='#28d2c2')) | |
fig1.update_layout( | |
height=500, | |
xaxis_title="Years", | |
yaxis_title='Life expectancy in age', | |
title_text='Average Life expectancy of Developing and Developed countries over the years', | |
template=template) | |
fig1.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment