" Country Region ... Generosity Dystopia Residual\n",
"0 Switzerland Western Europe ... 0.29678 2.51738\n",
"101 Greece Western Europe ... 0.00000 1.80101\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"North America\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Canada</td>\n",
" <td>North America</td>\n",
" <td>5</td>\n",
" <td>7.427</td>\n",
" <td>0.03553</td>\n",
" <td>1.32629</td>\n",
" <td>1.32261</td>\n",
" <td>0.90563</td>\n",
" <td>0.63297</td>\n",
" <td>0.32957</td>\n",
" <td>0.45811</td>\n",
" <td>2.45176</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>United States</td>\n",
" <td>North America</td>\n",
" <td>15</td>\n",
" <td>7.119</td>\n",
" <td>0.03839</td>\n",
" <td>1.39451</td>\n",
" <td>1.24711</td>\n",
" <td>0.86179</td>\n",
" <td>0.54604</td>\n",
" <td>0.15890</td>\n",
" <td>0.40105</td>\n",
" <td>2.51011</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"4 Canada North America ... 0.45811 2.45176\n",
"14 United States North America ... 0.40105 2.51011\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Australia and New Zealand\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>New Zealand</td>\n",
" <td>Australia and New Zealand</td>\n",
" <td>9</td>\n",
" <td>7.286</td>\n",
" <td>0.03371</td>\n",
" <td>1.25018</td>\n",
" <td>1.31967</td>\n",
" <td>0.90837</td>\n",
" <td>0.63938</td>\n",
" <td>0.42922</td>\n",
" <td>0.47501</td>\n",
" <td>2.26425</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>Australia</td>\n",
" <td>Australia and New Zealand</td>\n",
" <td>10</td>\n",
" <td>7.284</td>\n",
" <td>0.04083</td>\n",
" <td>1.33358</td>\n",
" <td>1.30923</td>\n",
" <td>0.93156</td>\n",
" <td>0.65124</td>\n",
" <td>0.35637</td>\n",
" <td>0.43562</td>\n",
" <td>2.26646</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"8 New Zealand Australia and New Zealand ... 0.47501 2.26425\n",
"9 Australia Australia and New Zealand ... 0.43562 2.26646\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Middle East and Northern Africa\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>Israel</td>\n",
" <td>Middle East and Northern Africa</td>\n",
" <td>11</td>\n",
" <td>7.278</td>\n",
" <td>0.03470</td>\n",
" <td>1.22857</td>\n",
" <td>1.22393</td>\n",
" <td>0.91387</td>\n",
" <td>0.41319</td>\n",
" <td>0.07785</td>\n",
" <td>0.33172</td>\n",
" <td>3.08854</td>\n",
" </tr>\n",
" <tr>\n",
" <th>155</th>\n",
" <td>Syria</td>\n",
" <td>Middle East and Northern Africa</td>\n",
" <td>156</td>\n",
" <td>3.006</td>\n",
" <td>0.05015</td>\n",
" <td>0.66320</td>\n",
" <td>0.47489</td>\n",
" <td>0.72193</td>\n",
" <td>0.15684</td>\n",
" <td>0.18906</td>\n",
" <td>0.47179</td>\n",
" <td>0.32858</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"10 Israel Middle East and Northern Africa ... 0.33172 3.08854\n",
"155 Syria Middle East and Northern Africa ... 0.47179 0.32858\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Latin America and Caribbean\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>Costa Rica</td>\n",
" <td>Latin America and Caribbean</td>\n",
" <td>12</td>\n",
" <td>7.226</td>\n",
" <td>0.04454</td>\n",
" <td>0.95578</td>\n",
" <td>1.23788</td>\n",
" <td>0.86027</td>\n",
" <td>0.63376</td>\n",
" <td>0.10583</td>\n",
" <td>0.25497</td>\n",
" <td>3.17728</td>\n",
" </tr>\n",
" <tr>\n",
" <th>118</th>\n",
" <td>Haiti</td>\n",
" <td>Latin America and Caribbean</td>\n",
" <td>119</td>\n",
" <td>4.518</td>\n",
" <td>0.07331</td>\n",
" <td>0.26673</td>\n",
" <td>0.74302</td>\n",
" <td>0.38847</td>\n",
" <td>0.24425</td>\n",
" <td>0.17175</td>\n",
" <td>0.46187</td>\n",
" <td>2.24173</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"11 Costa Rica Latin America and Caribbean ... 0.25497 3.17728\n",
"118 Haiti Latin America and Caribbean ... 0.46187 2.24173\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Southeastern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>Singapore</td>\n",
" <td>Southeastern Asia</td>\n",
" <td>24</td>\n",
" <td>6.798</td>\n",
" <td>0.03780</td>\n",
" <td>1.52186</td>\n",
" <td>1.02000</td>\n",
" <td>1.02525</td>\n",
" <td>0.54252</td>\n",
" <td>0.49210</td>\n",
" <td>0.31105</td>\n",
" <td>1.88501</td>\n",
" </tr>\n",
" <tr>\n",
" <th>144</th>\n",
" <td>Cambodia</td>\n",
" <td>Southeastern Asia</td>\n",
" <td>145</td>\n",
" <td>3.819</td>\n",
" <td>0.05069</td>\n",
" <td>0.46038</td>\n",
" <td>0.62736</td>\n",
" <td>0.61114</td>\n",
" <td>0.66246</td>\n",
" <td>0.07247</td>\n",
" <td>0.40359</td>\n",
" <td>0.98195</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"23 Singapore Southeastern Asia ... 0.31105 1.88501\n",
"144 Cambodia Southeastern Asia ... 0.40359 0.98195\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Central and Eastern Europe\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>30</th>\n",
" <td>Czech Republic</td>\n",
" <td>Central and Eastern Europe</td>\n",
" <td>31</td>\n",
" <td>6.505</td>\n",
" <td>0.04168</td>\n",
" <td>1.17898</td>\n",
" <td>1.20643</td>\n",
" <td>0.84483</td>\n",
" <td>0.46364</td>\n",
" <td>0.02652</td>\n",
" <td>0.10686</td>\n",
" <td>2.67782</td>\n",
" </tr>\n",
" <tr>\n",
" <th>133</th>\n",
" <td>Bulgaria</td>\n",
" <td>Central and Eastern Europe</td>\n",
" <td>134</td>\n",
" <td>4.218</td>\n",
" <td>0.04828</td>\n",
" <td>1.01216</td>\n",
" <td>1.10614</td>\n",
" <td>0.76649</td>\n",
" <td>0.30587</td>\n",
" <td>0.00872</td>\n",
" <td>0.11921</td>\n",
" <td>0.89991</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"30 Czech Republic Central and Eastern Europe ... 0.10686 2.67782\n",
"133 Bulgaria Central and Eastern Europe ... 0.11921 0.89991\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Eastern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>37</th>\n",
" <td>Taiwan</td>\n",
" <td>Eastern Asia</td>\n",
" <td>38</td>\n",
" <td>6.298</td>\n",
" <td>0.03868</td>\n",
" <td>1.29098</td>\n",
" <td>1.07617</td>\n",
" <td>0.87530</td>\n",
" <td>0.39740</td>\n",
" <td>0.08129</td>\n",
" <td>0.25376</td>\n",
" <td>2.32323</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>Mongolia</td>\n",
" <td>Eastern Asia</td>\n",
" <td>100</td>\n",
" <td>4.874</td>\n",
" <td>0.03313</td>\n",
" <td>0.82819</td>\n",
" <td>1.30060</td>\n",
" <td>0.60268</td>\n",
" <td>0.43626</td>\n",
" <td>0.02666</td>\n",
" <td>0.33230</td>\n",
" <td>1.34759</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"37 Taiwan Eastern Asia ... 0.25376 2.32323\n",
"99 Mongolia Eastern Asia ... 0.33230 1.34759\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Sub-Saharan Africa\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>70</th>\n",
" <td>Mauritius</td>\n",
" <td>Sub-Saharan Africa</td>\n",
" <td>71</td>\n",
" <td>5.477</td>\n",
" <td>0.07197</td>\n",
" <td>1.00761</td>\n",
" <td>0.98521</td>\n",
" <td>0.70950</td>\n",
" <td>0.56066</td>\n",
" <td>0.07521</td>\n",
" <td>0.37744</td>\n",
" <td>1.76145</td>\n",
" </tr>\n",
" <tr>\n",
" <th>157</th>\n",
" <td>Togo</td>\n",
" <td>Sub-Saharan Africa</td>\n",
" <td>158</td>\n",
" <td>2.839</td>\n",
" <td>0.06727</td>\n",
" <td>0.20868</td>\n",
" <td>0.13995</td>\n",
" <td>0.28443</td>\n",
" <td>0.36453</td>\n",
" <td>0.10731</td>\n",
" <td>0.16681</td>\n",
" <td>1.56726</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"70 Mauritius Sub-Saharan Africa ... 0.37744 1.76145\n",
"157 Togo Sub-Saharan Africa ... 0.16681 1.56726\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Southern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Standard Error</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>78</th>\n",
" <td>Bhutan</td>\n",
" <td>Southern Asia</td>\n",
" <td>79</td>\n",
" <td>5.253</td>\n",
" <td>0.03225</td>\n",
" <td>0.77042</td>\n",
" <td>1.10395</td>\n",
" <td>0.57407</td>\n",
" <td>0.53206</td>\n",
" <td>0.15445</td>\n",
" <td>0.47998</td>\n",
" <td>1.63794</td>\n",
" </tr>\n",
" <tr>\n",
" <th>152</th>\n",
" <td>Afghanistan</td>\n",
" <td>Southern Asia</td>\n",
" <td>153</td>\n",
" <td>3.575</td>\n",
" <td>0.03084</td>\n",
" <td>0.31982</td>\n",
" <td>0.30285</td>\n",
" <td>0.30335</td>\n",
" <td>0.23414</td>\n",
" <td>0.09719</td>\n",
" <td>0.36510</td>\n",
" <td>1.95210</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"78 Bhutan Southern Asia ... 0.47998 1.63794\n",
"152 Afghanistan Southern Asia ... 0.36510 1.95210\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"In the Year 2016 \n",
"Western Europe\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Denmark</td>\n",
" <td>Western Europe</td>\n",
" <td>1</td>\n",
" <td>7.526</td>\n",
" <td>7.460</td>\n",
" <td>7.592</td>\n",
" <td>1.44178</td>\n",
" <td>1.16374</td>\n",
" <td>0.79504</td>\n",
" <td>0.57941</td>\n",
" <td>0.44453</td>\n",
" <td>0.36171</td>\n",
" <td>2.73939</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>Greece</td>\n",
" <td>Western Europe</td>\n",
" <td>99</td>\n",
" <td>5.033</td>\n",
" <td>4.935</td>\n",
" <td>5.131</td>\n",
" <td>1.24886</td>\n",
" <td>0.75473</td>\n",
" <td>0.80029</td>\n",
" <td>0.05822</td>\n",
" <td>0.04127</td>\n",
" <td>0.00000</td>\n",
" <td>2.12944</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"0 Denmark Western Europe ... 0.36171 2.73939\n",
"98 Greece Western Europe ... 0.00000 2.12944\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"North America\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>Canada</td>\n",
" <td>North America</td>\n",
" <td>6</td>\n",
" <td>7.404</td>\n",
" <td>7.335</td>\n",
" <td>7.473</td>\n",
" <td>1.44015</td>\n",
" <td>1.09610</td>\n",
" <td>0.8276</td>\n",
" <td>0.57370</td>\n",
" <td>0.31329</td>\n",
" <td>0.44834</td>\n",
" <td>2.70485</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>United States</td>\n",
" <td>North America</td>\n",
" <td>13</td>\n",
" <td>7.104</td>\n",
" <td>7.020</td>\n",
" <td>7.188</td>\n",
" <td>1.50796</td>\n",
" <td>1.04782</td>\n",
" <td>0.7790</td>\n",
" <td>0.48163</td>\n",
" <td>0.14868</td>\n",
" <td>0.41077</td>\n",
" <td>2.72782</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"5 Canada North America ... 0.44834 2.70485\n",
"12 United States North America ... 0.41077 2.72782\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Australia and New Zealand\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>New Zealand</td>\n",
" <td>Australia and New Zealand</td>\n",
" <td>8</td>\n",
" <td>7.334</td>\n",
" <td>7.264</td>\n",
" <td>7.404</td>\n",
" <td>1.36066</td>\n",
" <td>1.17278</td>\n",
" <td>0.83096</td>\n",
" <td>0.58147</td>\n",
" <td>0.41904</td>\n",
" <td>0.49401</td>\n",
" <td>2.47553</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>Australia</td>\n",
" <td>Australia and New Zealand</td>\n",
" <td>9</td>\n",
" <td>7.313</td>\n",
" <td>7.241</td>\n",
" <td>7.385</td>\n",
" <td>1.44443</td>\n",
" <td>1.10476</td>\n",
" <td>0.85120</td>\n",
" <td>0.56837</td>\n",
" <td>0.32331</td>\n",
" <td>0.47407</td>\n",
" <td>2.54650</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"7 New Zealand Australia and New Zealand ... 0.49401 2.47553\n",
"8 Australia Australia and New Zealand ... 0.47407 2.54650\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Middle East and Northern Africa\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>Israel</td>\n",
" <td>Middle East and Northern Africa</td>\n",
" <td>11</td>\n",
" <td>7.267</td>\n",
" <td>7.199</td>\n",
" <td>7.335</td>\n",
" <td>1.33766</td>\n",
" <td>0.99537</td>\n",
" <td>0.84917</td>\n",
" <td>0.36432</td>\n",
" <td>0.08728</td>\n",
" <td>0.32288</td>\n",
" <td>3.31029</td>\n",
" </tr>\n",
" <tr>\n",
" <th>155</th>\n",
" <td>Syria</td>\n",
" <td>Middle East and Northern Africa</td>\n",
" <td>156</td>\n",
" <td>3.069</td>\n",
" <td>2.936</td>\n",
" <td>3.202</td>\n",
" <td>0.74719</td>\n",
" <td>0.14866</td>\n",
" <td>0.62994</td>\n",
" <td>0.06912</td>\n",
" <td>0.17233</td>\n",
" <td>0.48397</td>\n",
" <td>0.81789</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"10 Israel Middle East and Northern Africa ... 0.32288 3.31029\n",
"155 Syria Middle East and Northern Africa ... 0.48397 0.81789\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Latin America and Caribbean\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>Costa Rica</td>\n",
" <td>Latin America and Caribbean</td>\n",
" <td>14</td>\n",
" <td>7.087</td>\n",
" <td>6.999</td>\n",
" <td>7.175</td>\n",
" <td>1.06879</td>\n",
" <td>1.02152</td>\n",
" <td>0.76146</td>\n",
" <td>0.55225</td>\n",
" <td>0.10547</td>\n",
" <td>0.22553</td>\n",
" <td>3.35168</td>\n",
" </tr>\n",
" <tr>\n",
" <th>135</th>\n",
" <td>Haiti</td>\n",
" <td>Latin America and Caribbean</td>\n",
" <td>136</td>\n",
" <td>4.028</td>\n",
" <td>3.893</td>\n",
" <td>4.163</td>\n",
" <td>0.34097</td>\n",
" <td>0.29561</td>\n",
" <td>0.27494</td>\n",
" <td>0.12072</td>\n",
" <td>0.14476</td>\n",
" <td>0.47958</td>\n",
" <td>2.37116</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"13 Costa Rica Latin America and Caribbean ... 0.22553 3.35168\n",
"135 Haiti Latin America and Caribbean ... 0.47958 2.37116\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Southeastern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>Singapore</td>\n",
" <td>Southeastern Asia</td>\n",
" <td>22</td>\n",
" <td>6.739</td>\n",
" <td>6.674</td>\n",
" <td>6.804</td>\n",
" <td>1.64555</td>\n",
" <td>0.86758</td>\n",
" <td>0.94719</td>\n",
" <td>0.48770</td>\n",
" <td>0.46987</td>\n",
" <td>0.32706</td>\n",
" <td>1.99375</td>\n",
" </tr>\n",
" <tr>\n",
" <th>139</th>\n",
" <td>Cambodia</td>\n",
" <td>Southeastern Asia</td>\n",
" <td>140</td>\n",
" <td>3.907</td>\n",
" <td>3.798</td>\n",
" <td>4.016</td>\n",
" <td>0.55604</td>\n",
" <td>0.53750</td>\n",
" <td>0.42494</td>\n",
" <td>0.58852</td>\n",
" <td>0.08092</td>\n",
" <td>0.40339</td>\n",
" <td>1.31573</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"21 Singapore Southeastern Asia ... 0.32706 1.99375\n",
"139 Cambodia Southeastern Asia ... 0.40339 1.31573\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Central and Eastern Europe\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>Czech Republic</td>\n",
" <td>Central and Eastern Europe</td>\n",
" <td>27</td>\n",
" <td>6.596</td>\n",
" <td>6.515</td>\n",
" <td>6.677</td>\n",
" <td>1.30915</td>\n",
" <td>1.00793</td>\n",
" <td>0.76376</td>\n",
" <td>0.41418</td>\n",
" <td>0.03986</td>\n",
" <td>0.09929</td>\n",
" <td>2.96211</td>\n",
" </tr>\n",
" <tr>\n",
" <th>128</th>\n",
" <td>Bulgaria</td>\n",
" <td>Central and Eastern Europe</td>\n",
" <td>129</td>\n",
" <td>4.217</td>\n",
" <td>4.104</td>\n",
" <td>4.330</td>\n",
" <td>1.11306</td>\n",
" <td>0.92542</td>\n",
" <td>0.67806</td>\n",
" <td>0.21219</td>\n",
" <td>0.00615</td>\n",
" <td>0.12793</td>\n",
" <td>1.15377</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"26 Czech Republic Central and Eastern Europe ... 0.09929 2.96211\n",
"128 Bulgaria Central and Eastern Europe ... 0.12793 1.15377\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Eastern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>34</th>\n",
" <td>Taiwan</td>\n",
" <td>Eastern Asia</td>\n",
" <td>34</td>\n",
" <td>6.379</td>\n",
" <td>6.305</td>\n",
" <td>6.453</td>\n",
" <td>1.39729</td>\n",
" <td>0.92624</td>\n",
" <td>0.79565</td>\n",
" <td>0.32377</td>\n",
" <td>0.06630</td>\n",
" <td>0.25495</td>\n",
" <td>2.61523</td>\n",
" </tr>\n",
" <tr>\n",
" <th>100</th>\n",
" <td>Mongolia</td>\n",
" <td>Eastern Asia</td>\n",
" <td>101</td>\n",
" <td>4.907</td>\n",
" <td>4.838</td>\n",
" <td>4.976</td>\n",
" <td>0.98853</td>\n",
" <td>1.08983</td>\n",
" <td>0.55469</td>\n",
" <td>0.35972</td>\n",
" <td>0.03285</td>\n",
" <td>0.34539</td>\n",
" <td>1.53586</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"34 Taiwan Eastern Asia ... 0.25495 2.61523\n",
"100 Mongolia Eastern Asia ... 0.34539 1.53586\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Sub-Saharan Africa\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>65</th>\n",
" <td>Mauritius</td>\n",
" <td>Sub-Saharan Africa</td>\n",
" <td>66</td>\n",
" <td>5.648</td>\n",
" <td>5.507</td>\n",
" <td>5.789</td>\n",
" <td>1.14372</td>\n",
" <td>0.75695</td>\n",
" <td>0.66189</td>\n",
" <td>0.46145</td>\n",
" <td>0.05203</td>\n",
" <td>0.36951</td>\n",
" <td>2.20223</td>\n",
" </tr>\n",
" <tr>\n",
" <th>156</th>\n",
" <td>Burundi</td>\n",
" <td>Sub-Saharan Africa</td>\n",
" <td>157</td>\n",
" <td>2.905</td>\n",
" <td>2.732</td>\n",
" <td>3.078</td>\n",
" <td>0.06831</td>\n",
" <td>0.23442</td>\n",
" <td>0.15747</td>\n",
" <td>0.04320</td>\n",
" <td>0.09419</td>\n",
" <td>0.20290</td>\n",
" <td>2.10404</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"65 Mauritius Sub-Saharan Africa ... 0.36951 2.20223\n",
"156 Burundi Sub-Saharan Africa ... 0.20290 2.10404\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Southern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Region</th>\n",
" <th>Happiness Rank</th>\n",
" <th>Happiness Score</th>\n",
" <th>Lower Confidence Interval</th>\n",
" <th>Upper Confidence Interval</th>\n",
" <th>Economy (GDP per Capita)</th>\n",
" <th>Family</th>\n",
" <th>Health (Life Expectancy)</th>\n",
" <th>Freedom</th>\n",
" <th>Trust (Government Corruption)</th>\n",
" <th>Generosity</th>\n",
" <th>Dystopia Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>83</th>\n",
" <td>Bhutan</td>\n",
" <td>Southern Asia</td>\n",
" <td>84</td>\n",
" <td>5.196</td>\n",
" <td>5.138</td>\n",
" <td>5.254</td>\n",
" <td>0.85270</td>\n",
" <td>0.90836</td>\n",
" <td>0.49759</td>\n",
" <td>0.46074</td>\n",
" <td>0.16160</td>\n",
" <td>0.48546</td>\n",
" <td>1.82916</td>\n",
" </tr>\n",
" <tr>\n",
" <th>153</th>\n",
" <td>Afghanistan</td>\n",
" <td>Southern Asia</td>\n",
" <td>154</td>\n",
" <td>3.360</td>\n",
" <td>3.288</td>\n",
" <td>3.432</td>\n",
" <td>0.38227</td>\n",
" <td>0.11037</td>\n",
" <td>0.17344</td>\n",
" <td>0.16430</td>\n",
" <td>0.07112</td>\n",
" <td>0.31268</td>\n",
" <td>2.14558</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Region ... Generosity Dystopia Residual\n",
"83 Bhutan Southern Asia ... 0.48546 1.82916\n",
"153 Afghanistan Southern Asia ... 0.31268 2.14558\n",
"\n",
"[2 rows x 13 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"In the Year 2017 \n",
"\n",
"Western Europe\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Norway</td>\n",
" <td>1</td>\n",
" <td>7.537</td>\n",
" <td>7.594445</td>\n",
" <td>7.479556</td>\n",
" <td>1.616463</td>\n",
" <td>1.533524</td>\n",
" <td>0.796667</td>\n",
" <td>0.635423</td>\n",
" <td>0.362012</td>\n",
" <td>0.315964</td>\n",
" <td>2.277027</td>\n",
" </tr>\n",
" <tr>\n",
" <th>88</th>\n",
" <td>Portugal</td>\n",
" <td>89</td>\n",
" <td>5.195</td>\n",
" <td>5.285042</td>\n",
" <td>5.104959</td>\n",
" <td>1.315175</td>\n",
" <td>1.367043</td>\n",
" <td>0.795844</td>\n",
" <td>0.498465</td>\n",
" <td>0.095103</td>\n",
" <td>0.015869</td>\n",
" <td>1.107683</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Happiness.Rank ... Trust..Government.Corruption. Dystopia.Residual\n",
"0 Norway 1 ... 0.315964 2.277027\n",
"88 Portugal 89 ... 0.015869 1.107683\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"North America\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>Canada</td>\n",
" <td>7</td>\n",
" <td>7.316</td>\n",
" <td>7.384403</td>\n",
" <td>7.247597</td>\n",
" <td>1.479204</td>\n",
" <td>1.481349</td>\n",
" <td>0.834558</td>\n",
" <td>0.611101</td>\n",
" <td>0.435540</td>\n",
" <td>0.287372</td>\n",
" <td>2.187264</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>United States</td>\n",
" <td>14</td>\n",
" <td>6.993</td>\n",
" <td>7.074657</td>\n",
" <td>6.911343</td>\n",
" <td>1.546259</td>\n",
" <td>1.419921</td>\n",
" <td>0.774287</td>\n",
" <td>0.505741</td>\n",
" <td>0.392579</td>\n",
" <td>0.135639</td>\n",
" <td>2.218113</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country ... Dystopia.Residual\n",
"6 Canada ... 2.187264\n",
"13 United States ... 2.218113\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Australia and New Zealand\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>New Zealand</td>\n",
" <td>8</td>\n",
" <td>7.314</td>\n",
" <td>7.379510</td>\n",
" <td>7.248490</td>\n",
" <td>1.405706</td>\n",
" <td>1.548195</td>\n",
" <td>0.816760</td>\n",
" <td>0.614062</td>\n",
" <td>0.500005</td>\n",
" <td>0.382817</td>\n",
" <td>2.046456</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>Australia</td>\n",
" <td>10</td>\n",
" <td>7.284</td>\n",
" <td>7.356651</td>\n",
" <td>7.211349</td>\n",
" <td>1.484415</td>\n",
" <td>1.510042</td>\n",
" <td>0.843887</td>\n",
" <td>0.601607</td>\n",
" <td>0.477699</td>\n",
" <td>0.301184</td>\n",
" <td>2.065211</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country ... Dystopia.Residual\n",
"7 New Zealand ... 2.046456\n",
"9 Australia ... 2.065211\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Middle East and Northern Africa\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>Israel</td>\n",
" <td>11</td>\n",
" <td>7.213</td>\n",
" <td>7.279853</td>\n",
" <td>7.146146</td>\n",
" <td>1.375382</td>\n",
" <td>1.376290</td>\n",
" <td>0.838404</td>\n",
" <td>0.405989</td>\n",
" <td>0.330083</td>\n",
" <td>0.085242</td>\n",
" <td>2.801757</td>\n",
" </tr>\n",
" <tr>\n",
" <th>151</th>\n",
" <td>Syria</td>\n",
" <td>152</td>\n",
" <td>3.462</td>\n",
" <td>3.663669</td>\n",
" <td>3.260331</td>\n",
" <td>0.777153</td>\n",
" <td>0.396103</td>\n",
" <td>0.500533</td>\n",
" <td>0.081539</td>\n",
" <td>0.493664</td>\n",
" <td>0.151347</td>\n",
" <td>1.061574</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Happiness.Rank ... Trust..Government.Corruption. Dystopia.Residual\n",
"10 Israel 11 ... 0.085242 2.801757\n",
"151 Syria 152 ... 0.151347 1.061574\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Latin America and Caribbean\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>Costa Rica</td>\n",
" <td>12</td>\n",
" <td>7.079</td>\n",
" <td>7.168112</td>\n",
" <td>6.989888</td>\n",
" <td>1.109706</td>\n",
" <td>1.416404</td>\n",
" <td>0.759509</td>\n",
" <td>0.580132</td>\n",
" <td>0.214613</td>\n",
" <td>0.100107</td>\n",
" <td>2.898639</td>\n",
" </tr>\n",
" <tr>\n",
" <th>144</th>\n",
" <td>Haiti</td>\n",
" <td>145</td>\n",
" <td>3.603</td>\n",
" <td>3.734715</td>\n",
" <td>3.471285</td>\n",
" <td>0.368610</td>\n",
" <td>0.640450</td>\n",
" <td>0.277321</td>\n",
" <td>0.030370</td>\n",
" <td>0.489204</td>\n",
" <td>0.099872</td>\n",
" <td>1.697168</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country ... Dystopia.Residual\n",
"11 Costa Rica ... 2.898639\n",
"144 Haiti ... 1.697168\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Southeastern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>Singapore</td>\n",
" <td>26</td>\n",
" <td>6.572</td>\n",
" <td>6.636723</td>\n",
" <td>6.507277</td>\n",
" <td>1.692278</td>\n",
" <td>1.353814</td>\n",
" <td>0.949492</td>\n",
" <td>0.549841</td>\n",
" <td>0.345966</td>\n",
" <td>0.464308</td>\n",
" <td>1.216362</td>\n",
" </tr>\n",
" <tr>\n",
" <th>128</th>\n",
" <td>Cambodia</td>\n",
" <td>129</td>\n",
" <td>4.168</td>\n",
" <td>4.278518</td>\n",
" <td>4.057483</td>\n",
" <td>0.601765</td>\n",
" <td>1.006238</td>\n",
" <td>0.429783</td>\n",
" <td>0.633376</td>\n",
" <td>0.385923</td>\n",
" <td>0.068106</td>\n",
" <td>1.042941</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country ... Dystopia.Residual\n",
"25 Singapore ... 1.216362\n",
"128 Cambodia ... 1.042941\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Central and Eastern Europe\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>Czech Republic</td>\n",
" <td>23</td>\n",
" <td>6.609</td>\n",
" <td>6.683862</td>\n",
" <td>6.534138</td>\n",
" <td>1.352682</td>\n",
" <td>1.433885</td>\n",
" <td>0.754444</td>\n",
" <td>0.490946</td>\n",
" <td>0.088107</td>\n",
" <td>0.036873</td>\n",
" <td>2.451862</td>\n",
" </tr>\n",
" <tr>\n",
" <th>131</th>\n",
" <td>Ukraine</td>\n",
" <td>132</td>\n",
" <td>4.096</td>\n",
" <td>4.185410</td>\n",
" <td>4.006590</td>\n",
" <td>0.894652</td>\n",
" <td>1.394538</td>\n",
" <td>0.575904</td>\n",
" <td>0.122975</td>\n",
" <td>0.270061</td>\n",
" <td>0.023029</td>\n",
" <td>0.814382</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country ... Dystopia.Residual\n",
"22 Czech Republic ... 2.451862\n",
"131 Ukraine ... 0.814382\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Eastern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>50</th>\n",
" <td>Japan</td>\n",
" <td>51</td>\n",
" <td>5.920</td>\n",
" <td>5.990719</td>\n",
" <td>5.849281</td>\n",
" <td>1.416915</td>\n",
" <td>1.436338</td>\n",
" <td>0.913476</td>\n",
" <td>0.505626</td>\n",
" <td>0.120573</td>\n",
" <td>0.163761</td>\n",
" <td>1.363224</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>Mongolia</td>\n",
" <td>100</td>\n",
" <td>4.955</td>\n",
" <td>5.021680</td>\n",
" <td>4.888320</td>\n",
" <td>1.027236</td>\n",
" <td>1.493011</td>\n",
" <td>0.557783</td>\n",
" <td>0.394144</td>\n",
" <td>0.338464</td>\n",
" <td>0.032902</td>\n",
" <td>1.111292</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country Happiness.Rank ... Trust..Government.Corruption. Dystopia.Residual\n",
"50 Japan 51 ... 0.163761 1.363224\n",
"99 Mongolia 100 ... 0.032902 1.111292\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Sub-Saharan Africa\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>63</th>\n",
" <td>Mauritius</td>\n",
" <td>64</td>\n",
" <td>5.629</td>\n",
" <td>5.729862</td>\n",
" <td>5.528138</td>\n",
" <td>1.189396</td>\n",
" <td>1.209561</td>\n",
" <td>0.638007</td>\n",
" <td>0.491247</td>\n",
" <td>0.360934</td>\n",
" <td>0.042182</td>\n",
" <td>1.697584</td>\n",
" </tr>\n",
" <tr>\n",
" <th>154</th>\n",
" <td>Central African Republic</td>\n",
" <td>155</td>\n",
" <td>2.693</td>\n",
" <td>2.864884</td>\n",
" <td>2.521116</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.018773</td>\n",
" <td>0.270842</td>\n",
" <td>0.280876</td>\n",
" <td>0.056565</td>\n",
" <td>2.066005</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country ... Dystopia.Residual\n",
"63 Mauritius ... 1.697584\n",
"154 Central African Republic ... 2.066005\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n",
"Southern Asia\n",
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Country</th>\n",
" <th>Happiness.Rank</th>\n",
" <th>Happiness.Score</th>\n",
" <th>Whisker.high</th>\n",
" <th>Whisker.low</th>\n",
" <th>Economy..GDP.per.Capita.</th>\n",
" <th>Family</th>\n",
" <th>Health..Life.Expectancy.</th>\n",
" <th>Freedom</th>\n",
" <th>Generosity</th>\n",
" <th>Trust..Government.Corruption.</th>\n",
" <th>Dystopia.Residual</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>79</th>\n",
" <td>Pakistan</td>\n",
" <td>80</td>\n",
" <td>5.269</td>\n",
" <td>5.359984</td>\n",
" <td>5.178016</td>\n",
" <td>0.726884</td>\n",
" <td>0.672691</td>\n",
" <td>0.402048</td>\n",
" <td>0.235215</td>\n",
" <td>0.315446</td>\n",
" <td>0.124348</td>\n",
" <td>2.792489</td>\n",
" </tr>\n",
" <tr>\n",
" <th>140</th>\n",
" <td>Afghanistan</td>\n",
" <td>141</td>\n",
" <td>3.794</td>\n",
" <td>3.873661</td>\n",
" <td>3.714338</td>\n",
" <td>0.401477</td>\n",
" <td>0.581543</td>\n",
" <td>0.180747</td>\n",
" <td>0.106180</td>\n",
" <td>0.311871</td>\n",
" <td>0.061158</td>\n",
" <td>2.150801</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Country ... Dystopia.Residual\n",
"79 Pakistan ... 2.792489\n",
"140 Afghanistan ... 2.150801\n",
"\n",
"[2 rows x 12 columns]"
]
},
"metadata": {
"tags": []
}
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "1xTbfYrPD0XC",
"colab_type": "text"
},
"source": [
"# Question 4\n",
"\n",
"**4.Countries that became unhappy between 2015 to 2017** \n",
"\n",
"Happiness Score\n",
"\n",
"A metric measured in 2015 by asking the sampled people the question: \"How would you rate your happiness on a scale of 0 to 10 where 10 is the happiest.\"\n",
"\n",
"As per the Metric, All the countries above 5 are considered to be \"happy\" and all the countries below the score of 5 are considered to be \"unhappy\"."
]
},
{
"cell_type": "code",
"metadata": {
"id": "4nC62RAOSflj",
"colab_type": "code",
"colab": {}
},
"source": [
"def happiness_more_than_score(df,score):\n",
" \"\"\"Gathers the country names with happiness score greater than specified.\"\"\"\n",