application_vnd.jupyter.stderr_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import plotly_express as px

df = pd.read_csv('../input/2019-world-happiness-report-csv-file/2019.csv')

df.shape

top_10 = df.iloc[0:10, 0:3]
top_10

fig = px.pie(top_10, values='Score', names='Country or region', color_discrete_sequence=px.colors.sequential.RdBu, 
             title='Top 10 Country and their score',
             hover_data=['Overall rank'], labels={'Overall rank':'Overall rank'})
fig.update_traces(textposition='inside', textinfo='percent+label')
fig.show()

bottom_10 = df.iloc[142:152, 0:3]
bottom_10

bottom_10.shape

fig = px.pie(bottom_10, values='Score', names='Country or region', color_discrete_sequence=px.colors.sequential.RdBu, title='Top 10 Country and their score', hover_data=['Overall rank'], labels={'Overall rank': 'Overall rank'})
fig.update_traces(textposition='inside', textinfo='percent+label')
fig.show()