Skip to content

Instantly share code, notes, and snippets.

@JonathanReeve
Created June 23, 2021 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonathanReeve/052253ee25fdf832357d3a79a5fdc044 to your computer and use it in GitHub Desktop.
Save JonathanReeve/052253ee25fdf832357d3a79a5fdc044 to your computer and use it in GitHub Desktop.
02-nyu-pit-intro-python.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "02-nyu-pit-intro-python.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyPbkxQyNVVIb+mPsz1DYvY+",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/JonathanReeve/052253ee25fdf832357d3a79a5fdc044/02-nyu-pit-intro-python.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "QMKdiXS4Ag1M"
},
"source": [
"import pandas as pd"
],
"execution_count": 5,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "bgs9HlEyAD5A",
"outputId": "49ae8235-e533-492b-893c-e76154c93b07"
},
"source": [
"!wget http://swcarpentry.github.io/python-novice-gapminder/files/python-novice-gapminder-data.zip"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"--2021-06-23 13:13:55-- http://swcarpentry.github.io/python-novice-gapminder/files/python-novice-gapminder-data.zip\n",
"Resolving swcarpentry.github.io (swcarpentry.github.io)... 185.199.108.153, 185.199.109.153, 185.199.110.153, ...\n",
"Connecting to swcarpentry.github.io (swcarpentry.github.io)|185.199.108.153|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 38471 (38K) [application/zip]\n",
"Saving to: ‘python-novice-gapminder-data.zip’\n",
"\n",
"\r python-no 0%[ ] 0 --.-KB/s \rpython-novice-gapmi 100%[===================>] 37.57K --.-KB/s in 0s \n",
"\n",
"2021-06-23 13:13:55 (203 MB/s) - ‘python-novice-gapminder-data.zip’ saved [38471/38471]\n",
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "3SAV45B2AWRk",
"outputId": "0092962b-a840-4e39-e33a-320d3b7933c0"
},
"source": [
"!unzip python-novice-gapminder-data.zip"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Archive: python-novice-gapminder-data.zip\n",
" inflating: data/gapminder_all.csv \n",
" inflating: data/gapminder_gdp_africa.csv \n",
" inflating: data/gapminder_gdp_americas.csv \n",
" inflating: data/gapminder_gdp_asia.csv \n",
" inflating: data/gapminder_gdp_europe.csv \n",
" inflating: data/gapminder_gdp_oceania.csv \n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "4mI7_kxuAcUg"
},
"source": [
"df = pd.read_csv('data/gapminder_all.csv')"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "xAwY-6w1A_jr"
},
"source": [
"mask = df['continent'] == \"Europe\"\n",
"df[mask] "
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "LGNe8cLpBB27"
},
"source": [
""
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "5h_rvsXiBjLx"
},
"source": [
"- Single equals `=` denotes variable assignment\n",
"- Double equals `==` denotes comparison"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "ShIK55UpBqHH",
"outputId": "5f97f5a3-6338-4e5c-a96e-b8747d0ed0e0"
},
"source": [
"2 == 2"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"True"
]
},
"metadata": {
"tags": []
},
"execution_count": 7
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "bNaoUHRqBwCN",
"outputId": "da7630d2-4bb5-4981-da18-69eb15dd0ce0"
},
"source": [
"\"Jonathan\" == \"Jonathan\""
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"True"
]
},
"metadata": {
"tags": []
},
"execution_count": 8
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "R4swgaCnBzN_",
"outputId": "2f528bb3-3963-42a1-dc92-92dc80c03182"
},
"source": [
"\"Jonathan\" == \"cookie\""
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"False"
]
},
"metadata": {
"tags": []
},
"execution_count": 9
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ofJlojwmCw_v"
},
"source": [
"df.index = df['country']"
],
"execution_count": 16,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Z6HlaXJQC_O5",
"outputId": "24981a13-32d8-4814-a35b-8064981aaae9"
},
"source": [
"df.loc['Angola']"
],
"execution_count": 17,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"continent Africa\n",
"country Angola\n",
"gdpPercap_1952 3520.61\n",
"gdpPercap_1957 3827.94\n",
"gdpPercap_1962 4269.28\n",
"gdpPercap_1967 5522.78\n",
"gdpPercap_1972 5473.29\n",
"gdpPercap_1977 3008.65\n",
"gdpPercap_1982 2756.95\n",
"gdpPercap_1987 2430.21\n",
"gdpPercap_1992 2627.85\n",
"gdpPercap_1997 2277.14\n",
"gdpPercap_2002 2773.29\n",
"gdpPercap_2007 4797.23\n",
"lifeExp_1952 30.015\n",
"lifeExp_1957 31.999\n",
"lifeExp_1962 34\n",
"lifeExp_1967 35.985\n",
"lifeExp_1972 37.928\n",
"lifeExp_1977 39.483\n",
"lifeExp_1982 39.942\n",
"lifeExp_1987 39.906\n",
"lifeExp_1992 40.647\n",
"lifeExp_1997 40.963\n",
"lifeExp_2002 41.003\n",
"lifeExp_2007 42.731\n",
"pop_1952 4.2321e+06\n",
"pop_1957 4.56136e+06\n",
"pop_1962 4.82602e+06\n",
"pop_1967 5.24747e+06\n",
"pop_1972 5.89486e+06\n",
"pop_1977 6.16268e+06\n",
"pop_1982 7.01638e+06\n",
"pop_1987 7.87423e+06\n",
"pop_1992 8.73599e+06\n",
"pop_1997 9.87502e+06\n",
"pop_2002 10866106\n",
"pop_2007 12420476\n",
"Name: Angola, dtype: object"
]
},
"metadata": {
"tags": []
},
"execution_count": 17
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "4MLF7yL5B42_",
"outputId": "6e02d307-c13b-4e76-9cd6-9a9b71310f7b"
},
"source": [
"df.loc['Angola', 'gdpPercap_1952']"
],
"execution_count": 18,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"3520.610273"
]
},
"metadata": {
"tags": []
},
"execution_count": 18
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ieTGa21JCkFb"
},
"source": [
"df['gdpPercap_1952']"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ARY_-26CDS9R"
},
"source": [
"df.loc[:,'gdpPercap_1952']"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 234
},
"id": "awv3cbxwD497",
"outputId": "f0321a1c-a08c-48d7-f88a-0ea2a23e2c9e"
},
"source": [
"df.loc['Italy':'Poland', 'gdpPercap_1962':'gdpPercap_1972']"
],
"execution_count": 26,
"outputs": [
{
"output_type": "execute_result",
"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>gdpPercap_1962</th>\n",
" <th>gdpPercap_1967</th>\n",
" <th>gdpPercap_1972</th>\n",
" </tr>\n",
" <tr>\n",
" <th>country</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Italy</th>\n",
" <td>8243.582340</td>\n",
" <td>10022.401310</td>\n",
" <td>12269.273780</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Montenegro</th>\n",
" <td>4649.593785</td>\n",
" <td>5907.850937</td>\n",
" <td>7778.414017</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Netherlands</th>\n",
" <td>12790.849560</td>\n",
" <td>15363.251360</td>\n",
" <td>18794.745670</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Norway</th>\n",
" <td>13450.401510</td>\n",
" <td>16361.876470</td>\n",
" <td>18965.055510</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Poland</th>\n",
" <td>5338.752143</td>\n",
" <td>6557.152776</td>\n",
" <td>8006.506993</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" gdpPercap_1962 gdpPercap_1967 gdpPercap_1972\n",
"country \n",
"Italy 8243.582340 10022.401310 12269.273780\n",
"Montenegro 4649.593785 5907.850937 7778.414017\n",
"Netherlands 12790.849560 15363.251360 18794.745670\n",
"Norway 13450.401510 16361.876470 18965.055510\n",
"Poland 5338.752143 6557.152776 8006.506993"
]
},
"metadata": {
"tags": []
},
"execution_count": 26
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ZKSkhjLlEUvy"
},
"source": [
""
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "3Rn3Y2cKEdd8"
},
"source": [
"myList = [2, 3, 4, 5]"
],
"execution_count": 27,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "NrWiMxaSEjs-"
},
"source": [
"myList = [2, 3, 4, \"Jonathan\"]"
],
"execution_count": 28,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "IR71x4Y4Em21",
"outputId": "de6aaebd-a7a4-4caa-d287-b4f47b83800a"
},
"source": [
"myList[-1][1]"
],
"execution_count": 33,
"outputs": [
{
"output_type": "execute_result",
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
},
"text/plain": [
"'o'"
]
},
"metadata": {
"tags": []
},
"execution_count": 33
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "MwUmUvJWEpl3"
},
"source": [
"countryList = ['Italy', 'Poland']"
],
"execution_count": 34,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "3q-_yV7yFArR",
"outputId": "bbb304ed-6d1f-43ed-bd95-33a4bfae7d7e"
},
"source": [
"len(countryList)"
],
"execution_count": 35,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"2"
]
},
"metadata": {
"tags": []
},
"execution_count": 35
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 161
},
"id": "hkUhm3LSFFEU",
"outputId": "f2b4ce51-70c9-4bd9-d3b6-46a0e61f965c"
},
"source": [
"df.loc[countryList]"
],
"execution_count": 39,
"outputs": [
{
"output_type": "execute_result",
"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>continent</th>\n",
" <th>country</th>\n",
" <th>gdpPercap_1952</th>\n",
" <th>gdpPercap_1957</th>\n",
" <th>gdpPercap_1962</th>\n",
" <th>gdpPercap_1967</th>\n",
" <th>gdpPercap_1972</th>\n",
" <th>gdpPercap_1977</th>\n",
" <th>gdpPercap_1982</th>\n",
" <th>gdpPercap_1987</th>\n",
" <th>gdpPercap_1992</th>\n",
" <th>gdpPercap_1997</th>\n",
" <th>gdpPercap_2002</th>\n",
" <th>gdpPercap_2007</th>\n",
" <th>lifeExp_1952</th>\n",
" <th>lifeExp_1957</th>\n",
" <th>lifeExp_1962</th>\n",
" <th>lifeExp_1967</th>\n",
" <th>lifeExp_1972</th>\n",
" <th>lifeExp_1977</th>\n",
" <th>lifeExp_1982</th>\n",
" <th>lifeExp_1987</th>\n",
" <th>lifeExp_1992</th>\n",
" <th>lifeExp_1997</th>\n",
" <th>lifeExp_2002</th>\n",
" <th>lifeExp_2007</th>\n",
" <th>pop_1952</th>\n",
" <th>pop_1957</th>\n",
" <th>pop_1962</th>\n",
" <th>pop_1967</th>\n",
" <th>pop_1972</th>\n",
" <th>pop_1977</th>\n",
" <th>pop_1982</th>\n",
" <th>pop_1987</th>\n",
" <th>pop_1992</th>\n",
" <th>pop_1997</th>\n",
" <th>pop_2002</th>\n",
" <th>pop_2007</th>\n",
" </tr>\n",
" <tr>\n",
" <th>country</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Italy</th>\n",
" <td>Europe</td>\n",
" <td>Italy</td>\n",
" <td>4931.404155</td>\n",
" <td>6248.656232</td>\n",
" <td>8243.582340</td>\n",
" <td>10022.401310</td>\n",
" <td>12269.273780</td>\n",
" <td>14255.984750</td>\n",
" <td>16537.483500</td>\n",
" <td>19207.234820</td>\n",
" <td>22013.644860</td>\n",
" <td>24675.02446</td>\n",
" <td>27968.09817</td>\n",
" <td>28569.71970</td>\n",
" <td>65.94</td>\n",
" <td>67.81</td>\n",
" <td>69.24</td>\n",
" <td>71.06</td>\n",
" <td>72.19</td>\n",
" <td>73.48</td>\n",
" <td>74.98</td>\n",
" <td>76.42</td>\n",
" <td>77.44</td>\n",
" <td>78.82</td>\n",
" <td>80.24</td>\n",
" <td>80.546</td>\n",
" <td>47666000.0</td>\n",
" <td>49182000.0</td>\n",
" <td>50843200.0</td>\n",
" <td>52667100.0</td>\n",
" <td>54365564.0</td>\n",
" <td>56059245.0</td>\n",
" <td>56535636.0</td>\n",
" <td>56729703.0</td>\n",
" <td>56840847.0</td>\n",
" <td>57479469.0</td>\n",
" <td>57926999</td>\n",
" <td>58147733</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Poland</th>\n",
" <td>Europe</td>\n",
" <td>Poland</td>\n",
" <td>4029.329699</td>\n",
" <td>4734.253019</td>\n",
" <td>5338.752143</td>\n",
" <td>6557.152776</td>\n",
" <td>8006.506993</td>\n",
" <td>9508.141454</td>\n",
" <td>8451.531004</td>\n",
" <td>9082.351172</td>\n",
" <td>7738.881247</td>\n",
" <td>10159.58368</td>\n",
" <td>12002.23908</td>\n",
" <td>15389.92468</td>\n",
" <td>61.31</td>\n",
" <td>65.77</td>\n",
" <td>67.64</td>\n",
" <td>69.61</td>\n",
" <td>70.85</td>\n",
" <td>70.67</td>\n",
" <td>71.32</td>\n",
" <td>70.98</td>\n",
" <td>70.99</td>\n",
" <td>72.75</td>\n",
" <td>74.67</td>\n",
" <td>75.563</td>\n",
" <td>25730551.0</td>\n",
" <td>28235346.0</td>\n",
" <td>30329617.0</td>\n",
" <td>31785378.0</td>\n",
" <td>33039545.0</td>\n",
" <td>34621254.0</td>\n",
" <td>36227381.0</td>\n",
" <td>37740710.0</td>\n",
" <td>38370697.0</td>\n",
" <td>38654957.0</td>\n",
" <td>38625976</td>\n",
" <td>38518241</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" continent country gdpPercap_1952 ... pop_1997 pop_2002 pop_2007\n",
"country ... \n",
"Italy Europe Italy 4931.404155 ... 57479469.0 57926999 58147733\n",
"Poland Europe Poland 4029.329699 ... 38654957.0 38625976 38518241\n",
"\n",
"[2 rows x 38 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 39
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 161
},
"id": "d2GQkE-vFLJZ",
"outputId": "2f3e60f9-56c9-4f0c-c633-c7b6b707c0ea"
},
"source": [
"df.loc[['Italy', 'Poland']]"
],
"execution_count": 40,
"outputs": [
{
"output_type": "execute_result",
"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>continent</th>\n",
" <th>country</th>\n",
" <th>gdpPercap_1952</th>\n",
" <th>gdpPercap_1957</th>\n",
" <th>gdpPercap_1962</th>\n",
" <th>gdpPercap_1967</th>\n",
" <th>gdpPercap_1972</th>\n",
" <th>gdpPercap_1977</th>\n",
" <th>gdpPercap_1982</th>\n",
" <th>gdpPercap_1987</th>\n",
" <th>gdpPercap_1992</th>\n",
" <th>gdpPercap_1997</th>\n",
" <th>gdpPercap_2002</th>\n",
" <th>gdpPercap_2007</th>\n",
" <th>lifeExp_1952</th>\n",
" <th>lifeExp_1957</th>\n",
" <th>lifeExp_1962</th>\n",
" <th>lifeExp_1967</th>\n",
" <th>lifeExp_1972</th>\n",
" <th>lifeExp_1977</th>\n",
" <th>lifeExp_1982</th>\n",
" <th>lifeExp_1987</th>\n",
" <th>lifeExp_1992</th>\n",
" <th>lifeExp_1997</th>\n",
" <th>lifeExp_2002</th>\n",
" <th>lifeExp_2007</th>\n",
" <th>pop_1952</th>\n",
" <th>pop_1957</th>\n",
" <th>pop_1962</th>\n",
" <th>pop_1967</th>\n",
" <th>pop_1972</th>\n",
" <th>pop_1977</th>\n",
" <th>pop_1982</th>\n",
" <th>pop_1987</th>\n",
" <th>pop_1992</th>\n",
" <th>pop_1997</th>\n",
" <th>pop_2002</th>\n",
" <th>pop_2007</th>\n",
" </tr>\n",
" <tr>\n",
" <th>country</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Italy</th>\n",
" <td>Europe</td>\n",
" <td>Italy</td>\n",
" <td>4931.404155</td>\n",
" <td>6248.656232</td>\n",
" <td>8243.582340</td>\n",
" <td>10022.401310</td>\n",
" <td>12269.273780</td>\n",
" <td>14255.984750</td>\n",
" <td>16537.483500</td>\n",
" <td>19207.234820</td>\n",
" <td>22013.644860</td>\n",
" <td>24675.02446</td>\n",
" <td>27968.09817</td>\n",
" <td>28569.71970</td>\n",
" <td>65.94</td>\n",
" <td>67.81</td>\n",
" <td>69.24</td>\n",
" <td>71.06</td>\n",
" <td>72.19</td>\n",
" <td>73.48</td>\n",
" <td>74.98</td>\n",
" <td>76.42</td>\n",
" <td>77.44</td>\n",
" <td>78.82</td>\n",
" <td>80.24</td>\n",
" <td>80.546</td>\n",
" <td>47666000.0</td>\n",
" <td>49182000.0</td>\n",
" <td>50843200.0</td>\n",
" <td>52667100.0</td>\n",
" <td>54365564.0</td>\n",
" <td>56059245.0</td>\n",
" <td>56535636.0</td>\n",
" <td>56729703.0</td>\n",
" <td>56840847.0</td>\n",
" <td>57479469.0</td>\n",
" <td>57926999</td>\n",
" <td>58147733</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Poland</th>\n",
" <td>Europe</td>\n",
" <td>Poland</td>\n",
" <td>4029.329699</td>\n",
" <td>4734.253019</td>\n",
" <td>5338.752143</td>\n",
" <td>6557.152776</td>\n",
" <td>8006.506993</td>\n",
" <td>9508.141454</td>\n",
" <td>8451.531004</td>\n",
" <td>9082.351172</td>\n",
" <td>7738.881247</td>\n",
" <td>10159.58368</td>\n",
" <td>12002.23908</td>\n",
" <td>15389.92468</td>\n",
" <td>61.31</td>\n",
" <td>65.77</td>\n",
" <td>67.64</td>\n",
" <td>69.61</td>\n",
" <td>70.85</td>\n",
" <td>70.67</td>\n",
" <td>71.32</td>\n",
" <td>70.98</td>\n",
" <td>70.99</td>\n",
" <td>72.75</td>\n",
" <td>74.67</td>\n",
" <td>75.563</td>\n",
" <td>25730551.0</td>\n",
" <td>28235346.0</td>\n",
" <td>30329617.0</td>\n",
" <td>31785378.0</td>\n",
" <td>33039545.0</td>\n",
" <td>34621254.0</td>\n",
" <td>36227381.0</td>\n",
" <td>37740710.0</td>\n",
" <td>38370697.0</td>\n",
" <td>38654957.0</td>\n",
" <td>38625976</td>\n",
" <td>38518241</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" continent country gdpPercap_1952 ... pop_1997 pop_2002 pop_2007\n",
"country ... \n",
"Italy Europe Italy 4931.404155 ... 57479469.0 57926999 58147733\n",
"Poland Europe Poland 4029.329699 ... 38654957.0 38625976 38518241\n",
"\n",
"[2 rows x 38 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 40
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 768
},
"id": "3vZkJVnPFdKk",
"outputId": "7135188d-9581-4cc0-8822-ccc4d93616e5"
},
"source": [
"mask = df['gdpPercap_2007'] > 30000\n",
"df[mask]"
],
"execution_count": 43,
"outputs": [
{
"output_type": "execute_result",
"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>continent</th>\n",
" <th>country</th>\n",
" <th>gdpPercap_1952</th>\n",
" <th>gdpPercap_1957</th>\n",
" <th>gdpPercap_1962</th>\n",
" <th>gdpPercap_1967</th>\n",
" <th>gdpPercap_1972</th>\n",
" <th>gdpPercap_1977</th>\n",
" <th>gdpPercap_1982</th>\n",
" <th>gdpPercap_1987</th>\n",
" <th>gdpPercap_1992</th>\n",
" <th>gdpPercap_1997</th>\n",
" <th>gdpPercap_2002</th>\n",
" <th>gdpPercap_2007</th>\n",
" <th>lifeExp_1952</th>\n",
" <th>lifeExp_1957</th>\n",
" <th>lifeExp_1962</th>\n",
" <th>lifeExp_1967</th>\n",
" <th>lifeExp_1972</th>\n",
" <th>lifeExp_1977</th>\n",
" <th>lifeExp_1982</th>\n",
" <th>lifeExp_1987</th>\n",
" <th>lifeExp_1992</th>\n",
" <th>lifeExp_1997</th>\n",
" <th>lifeExp_2002</th>\n",
" <th>lifeExp_2007</th>\n",
" <th>pop_1952</th>\n",
" <th>pop_1957</th>\n",
" <th>pop_1962</th>\n",
" <th>pop_1967</th>\n",
" <th>pop_1972</th>\n",
" <th>pop_1977</th>\n",
" <th>pop_1982</th>\n",
" <th>pop_1987</th>\n",
" <th>pop_1992</th>\n",
" <th>pop_1997</th>\n",
" <th>pop_2002</th>\n",
" <th>pop_2007</th>\n",
" </tr>\n",
" <tr>\n",
" <th>country</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Canada</th>\n",
" <td>Americas</td>\n",
" <td>Canada</td>\n",
" <td>11367.161120</td>\n",
" <td>12489.950060</td>\n",
" <td>13462.485550</td>\n",
" <td>16076.588030</td>\n",
" <td>18970.570860</td>\n",
" <td>22090.88306</td>\n",
" <td>22898.79214</td>\n",
" <td>26626.51503</td>\n",
" <td>26342.88426</td>\n",
" <td>28954.92589</td>\n",
" <td>33328.96507</td>\n",
" <td>36319.23501</td>\n",
" <td>68.750</td>\n",
" <td>69.960</td>\n",
" <td>71.300</td>\n",
" <td>72.130</td>\n",
" <td>72.880</td>\n",
" <td>74.210</td>\n",
" <td>75.760</td>\n",
" <td>76.860</td>\n",
" <td>77.950</td>\n",
" <td>78.610</td>\n",
" <td>79.770</td>\n",
" <td>80.653</td>\n",
" <td>14785584.0</td>\n",
" <td>17010154.0</td>\n",
" <td>18985849.0</td>\n",
" <td>20819767.0</td>\n",
" <td>22284500.0</td>\n",
" <td>23796400.0</td>\n",
" <td>25201900.0</td>\n",
" <td>26549700.0</td>\n",
" <td>28523502.0</td>\n",
" <td>30305843.0</td>\n",
" <td>31902268</td>\n",
" <td>33390141</td>\n",
" </tr>\n",
" <tr>\n",
" <th>United States</th>\n",
" <td>Americas</td>\n",
" <td>United States</td>\n",
" <td>13990.482080</td>\n",
" <td>14847.127120</td>\n",
" <td>16173.145860</td>\n",
" <td>19530.365570</td>\n",
" <td>21806.035940</td>\n",
" <td>24072.63213</td>\n",
" <td>25009.55914</td>\n",
" <td>29884.35041</td>\n",
" <td>32003.93224</td>\n",
" <td>35767.43303</td>\n",
" <td>39097.09955</td>\n",
" <td>42951.65309</td>\n",
" <td>68.440</td>\n",
" <td>69.490</td>\n",
" <td>70.210</td>\n",
" <td>70.760</td>\n",
" <td>71.340</td>\n",
" <td>73.380</td>\n",
" <td>74.650</td>\n",
" <td>75.020</td>\n",
" <td>76.090</td>\n",
" <td>76.810</td>\n",
" <td>77.310</td>\n",
" <td>78.242</td>\n",
" <td>157553000.0</td>\n",
" <td>171984000.0</td>\n",
" <td>186538000.0</td>\n",
" <td>198712000.0</td>\n",
" <td>209896000.0</td>\n",
" <td>220239000.0</td>\n",
" <td>232187835.0</td>\n",
" <td>242803533.0</td>\n",
" <td>256894189.0</td>\n",
" <td>272911760.0</td>\n",
" <td>287675526</td>\n",
" <td>301139947</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Hong Kong China</th>\n",
" <td>Asia</td>\n",
" <td>Hong Kong China</td>\n",
" <td>3054.421209</td>\n",
" <td>3629.076457</td>\n",
" <td>4692.648272</td>\n",
" <td>6197.962814</td>\n",
" <td>8315.928145</td>\n",
" <td>11186.14125</td>\n",
" <td>14560.53051</td>\n",
" <td>20038.47269</td>\n",
" <td>24757.60301</td>\n",
" <td>28377.63219</td>\n",
" <td>30209.01516</td>\n",
" <td>39724.97867</td>\n",
" <td>60.960</td>\n",
" <td>64.750</td>\n",
" <td>67.650</td>\n",
" <td>70.000</td>\n",
" <td>72.000</td>\n",
" <td>73.600</td>\n",
" <td>75.450</td>\n",
" <td>76.200</td>\n",
" <td>77.601</td>\n",
" <td>80.000</td>\n",
" <td>81.495</td>\n",
" <td>82.208</td>\n",
" <td>2125900.0</td>\n",
" <td>2736300.0</td>\n",
" <td>3305200.0</td>\n",
" <td>3722800.0</td>\n",
" <td>4115700.0</td>\n",
" <td>4583700.0</td>\n",
" <td>5264500.0</td>\n",
" <td>5584510.0</td>\n",
" <td>5829696.0</td>\n",
" <td>6495918.0</td>\n",
" <td>6762476</td>\n",
" <td>6980412</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Japan</th>\n",
" <td>Asia</td>\n",
" <td>Japan</td>\n",
" <td>3216.956347</td>\n",
" <td>4317.694365</td>\n",
" <td>6576.649461</td>\n",
" <td>9847.788607</td>\n",
" <td>14778.786360</td>\n",
" <td>16610.37701</td>\n",
" <td>19384.10571</td>\n",
" <td>22375.94189</td>\n",
" <td>26824.89511</td>\n",
" <td>28816.58499</td>\n",
" <td>28604.59190</td>\n",
" <td>31656.06806</td>\n",
" <td>63.030</td>\n",
" <td>65.500</td>\n",
" <td>68.730</td>\n",
" <td>71.430</td>\n",
" <td>73.420</td>\n",
" <td>75.380</td>\n",
" <td>77.110</td>\n",
" <td>78.670</td>\n",
" <td>79.360</td>\n",
" <td>80.690</td>\n",
" <td>82.000</td>\n",
" <td>82.603</td>\n",
" <td>86459025.0</td>\n",
" <td>91563009.0</td>\n",
" <td>95831757.0</td>\n",
" <td>100825279.0</td>\n",
" <td>107188273.0</td>\n",
" <td>113872473.0</td>\n",
" <td>118454974.0</td>\n",
" <td>122091325.0</td>\n",
" <td>124329269.0</td>\n",
" <td>125956499.0</td>\n",
" <td>127065841</td>\n",
" <td>127467972</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Kuwait</th>\n",
" <td>Asia</td>\n",
" <td>Kuwait</td>\n",
" <td>108382.352900</td>\n",
" <td>113523.132900</td>\n",
" <td>95458.111760</td>\n",
" <td>80894.883260</td>\n",
" <td>109347.867000</td>\n",
" <td>59265.47714</td>\n",
" <td>31354.03573</td>\n",
" <td>28118.42998</td>\n",
" <td>34932.91959</td>\n",
" <td>40300.61996</td>\n",
" <td>35110.10566</td>\n",
" <td>47306.98978</td>\n",
" <td>55.565</td>\n",
" <td>58.033</td>\n",
" <td>60.470</td>\n",
" <td>64.624</td>\n",
" <td>67.712</td>\n",
" <td>69.343</td>\n",
" <td>71.309</td>\n",
" <td>74.174</td>\n",
" <td>75.190</td>\n",
" <td>76.156</td>\n",
" <td>76.904</td>\n",
" <td>77.588</td>\n",
" <td>160000.0</td>\n",
" <td>212846.0</td>\n",
" <td>358266.0</td>\n",
" <td>575003.0</td>\n",
" <td>841934.0</td>\n",
" <td>1140357.0</td>\n",
" <td>1497494.0</td>\n",
" <td>1891487.0</td>\n",
" <td>1418095.0</td>\n",
" <td>1765345.0</td>\n",
" <td>2111561</td>\n",
" <td>2505559</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Singapore</th>\n",
" <td>Asia</td>\n",
" <td>Singapore</td>\n",
" <td>2315.138227</td>\n",
" <td>2843.104409</td>\n",
" <td>3674.735572</td>\n",
" <td>4977.418540</td>\n",
" <td>8597.756202</td>\n",
" <td>11210.08948</td>\n",
" <td>15169.16112</td>\n",
" <td>18861.53081</td>\n",
" <td>24769.89120</td>\n",
" <td>33519.47660</td>\n",
" <td>36023.10540</td>\n",
" <td>47143.17964</td>\n",
" <td>60.396</td>\n",
" <td>63.179</td>\n",
" <td>65.798</td>\n",
" <td>67.946</td>\n",
" <td>69.521</td>\n",
" <td>70.795</td>\n",
" <td>71.760</td>\n",
" <td>73.560</td>\n",
" <td>75.788</td>\n",
" <td>77.158</td>\n",
" <td>78.770</td>\n",
" <td>79.972</td>\n",
" <td>1127000.0</td>\n",
" <td>1445929.0</td>\n",
" <td>1750200.0</td>\n",
" <td>1977600.0</td>\n",
" <td>2152400.0</td>\n",
" <td>2325300.0</td>\n",
" <td>2651869.0</td>\n",
" <td>2794552.0</td>\n",
" <td>3235865.0</td>\n",
" <td>3802309.0</td>\n",
" <td>4197776</td>\n",
" <td>4553009</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Austria</th>\n",
" <td>Europe</td>\n",
" <td>Austria</td>\n",
" <td>6137.076492</td>\n",
" <td>8842.598030</td>\n",
" <td>10750.721110</td>\n",
" <td>12834.602400</td>\n",
" <td>16661.625600</td>\n",
" <td>19749.42230</td>\n",
" <td>21597.08362</td>\n",
" <td>23687.82607</td>\n",
" <td>27042.01868</td>\n",
" <td>29095.92066</td>\n",
" <td>32417.60769</td>\n",
" <td>36126.49270</td>\n",
" <td>66.800</td>\n",
" <td>67.480</td>\n",
" <td>69.540</td>\n",
" <td>70.140</td>\n",
" <td>70.630</td>\n",
" <td>72.170</td>\n",
" <td>73.180</td>\n",
" <td>74.940</td>\n",
" <td>76.040</td>\n",
" <td>77.510</td>\n",
" <td>78.980</td>\n",
" <td>79.829</td>\n",
" <td>6927772.0</td>\n",
" <td>6965860.0</td>\n",
" <td>7129864.0</td>\n",
" <td>7376998.0</td>\n",
" <td>7544201.0</td>\n",
" <td>7568430.0</td>\n",
" <td>7574613.0</td>\n",
" <td>7578903.0</td>\n",
" <td>7914969.0</td>\n",
" <td>8069876.0</td>\n",
" <td>8148312</td>\n",
" <td>8199783</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Belgium</th>\n",
" <td>Europe</td>\n",
" <td>Belgium</td>\n",
" <td>8343.105127</td>\n",
" <td>9714.960623</td>\n",
" <td>10991.206760</td>\n",
" <td>13149.041190</td>\n",
" <td>16672.143560</td>\n",
" <td>19117.97448</td>\n",
" <td>20979.84589</td>\n",
" <td>22525.56308</td>\n",
" <td>25575.57069</td>\n",
" <td>27561.19663</td>\n",
" <td>30485.88375</td>\n",
" <td>33692.60508</td>\n",
" <td>68.000</td>\n",
" <td>69.240</td>\n",
" <td>70.250</td>\n",
" <td>70.940</td>\n",
" <td>71.440</td>\n",
" <td>72.800</td>\n",
" <td>73.930</td>\n",
" <td>75.350</td>\n",
" <td>76.460</td>\n",
" <td>77.530</td>\n",
" <td>78.320</td>\n",
" <td>79.441</td>\n",
" <td>8730405.0</td>\n",
" <td>8989111.0</td>\n",
" <td>9218400.0</td>\n",
" <td>9556500.0</td>\n",
" <td>9709100.0</td>\n",
" <td>9821800.0</td>\n",
" <td>9856303.0</td>\n",
" <td>9870200.0</td>\n",
" <td>10045622.0</td>\n",
" <td>10199787.0</td>\n",
" <td>10311970</td>\n",
" <td>10392226</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Denmark</th>\n",
" <td>Europe</td>\n",
" <td>Denmark</td>\n",
" <td>9692.385245</td>\n",
" <td>11099.659350</td>\n",
" <td>13583.313510</td>\n",
" <td>15937.211230</td>\n",
" <td>18866.207210</td>\n",
" <td>20422.90150</td>\n",
" <td>21688.04048</td>\n",
" <td>25116.17581</td>\n",
" <td>26406.73985</td>\n",
" <td>29804.34567</td>\n",
" <td>32166.50006</td>\n",
" <td>35278.41874</td>\n",
" <td>70.780</td>\n",
" <td>71.810</td>\n",
" <td>72.350</td>\n",
" <td>72.960</td>\n",
" <td>73.470</td>\n",
" <td>74.690</td>\n",
" <td>74.630</td>\n",
" <td>74.800</td>\n",
" <td>75.330</td>\n",
" <td>76.110</td>\n",
" <td>77.180</td>\n",
" <td>78.332</td>\n",
" <td>4334000.0</td>\n",
" <td>4487831.0</td>\n",
" <td>4646899.0</td>\n",
" <td>4838800.0</td>\n",
" <td>4991596.0</td>\n",
" <td>5088419.0</td>\n",
" <td>5117810.0</td>\n",
" <td>5127024.0</td>\n",
" <td>5171393.0</td>\n",
" <td>5283663.0</td>\n",
" <td>5374693</td>\n",
" <td>5468120</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Finland</th>\n",
" <td>Europe</td>\n",
" <td>Finland</td>\n",
" <td>6424.519071</td>\n",
" <td>7545.415386</td>\n",
" <td>9371.842561</td>\n",
" <td>10921.636260</td>\n",
" <td>14358.875900</td>\n",
" <td>15605.42283</td>\n",
" <td>18533.15761</td>\n",
" <td>21141.01223</td>\n",
" <td>20647.16499</td>\n",
" <td>23723.95020</td>\n",
" <td>28204.59057</td>\n",
" <td>33207.08440</td>\n",
" <td>66.550</td>\n",
" <td>67.490</td>\n",
" <td>68.750</td>\n",
" <td>69.830</td>\n",
" <td>70.870</td>\n",
" <td>72.520</td>\n",
" <td>74.550</td>\n",
" <td>74.830</td>\n",
" <td>75.700</td>\n",
" <td>77.130</td>\n",
" <td>78.370</td>\n",
" <td>79.313</td>\n",
" <td>4090500.0</td>\n",
" <td>4324000.0</td>\n",
" <td>4491443.0</td>\n",
" <td>4605744.0</td>\n",
" <td>4639657.0</td>\n",
" <td>4738902.0</td>\n",
" <td>4826933.0</td>\n",
" <td>4931729.0</td>\n",
" <td>5041039.0</td>\n",
" <td>5134406.0</td>\n",
" <td>5193039</td>\n",
" <td>5238460</td>\n",
" </tr>\n",
" <tr>\n",
" <th>France</th>\n",
" <td>Europe</td>\n",
" <td>France</td>\n",
" <td>7029.809327</td>\n",
" <td>8662.834898</td>\n",
" <td>10560.485530</td>\n",
" <td>12999.917660</td>\n",
" <td>16107.191710</td>\n",
" <td>18292.63514</td>\n",
" <td>20293.89746</td>\n",
" <td>22066.44214</td>\n",
" <td>24703.79615</td>\n",
" <td>25889.78487</td>\n",
" <td>28926.03234</td>\n",
" <td>30470.01670</td>\n",
" <td>67.410</td>\n",
" <td>68.930</td>\n",
" <td>70.510</td>\n",
" <td>71.550</td>\n",
" <td>72.380</td>\n",
" <td>73.830</td>\n",
" <td>74.890</td>\n",
" <td>76.340</td>\n",
" <td>77.460</td>\n",
" <td>78.640</td>\n",
" <td>79.590</td>\n",
" <td>80.657</td>\n",
" <td>42459667.0</td>\n",
" <td>44310863.0</td>\n",
" <td>47124000.0</td>\n",
" <td>49569000.0</td>\n",
" <td>51732000.0</td>\n",
" <td>53165019.0</td>\n",
" <td>54433565.0</td>\n",
" <td>55630100.0</td>\n",
" <td>57374179.0</td>\n",
" <td>58623428.0</td>\n",
" <td>59925035</td>\n",
" <td>61083916</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Germany</th>\n",
" <td>Europe</td>\n",
" <td>Germany</td>\n",
" <td>7144.114393</td>\n",
" <td>10187.826650</td>\n",
" <td>12902.462910</td>\n",
" <td>14745.625610</td>\n",
" <td>18016.180270</td>\n",
" <td>20512.92123</td>\n",
" <td>22031.53274</td>\n",
" <td>24639.18566</td>\n",
" <td>26505.30317</td>\n",
" <td>27788.88416</td>\n",
" <td>30035.80198</td>\n",
" <td>32170.37442</td>\n",
" <td>67.500</td>\n",
" <td>69.100</td>\n",
" <td>70.300</td>\n",
" <td>70.800</td>\n",
" <td>71.000</td>\n",
" <td>72.500</td>\n",
" <td>73.800</td>\n",
" <td>74.847</td>\n",
" <td>76.070</td>\n",
" <td>77.340</td>\n",
" <td>78.670</td>\n",
" <td>79.406</td>\n",
" <td>69145952.0</td>\n",
" <td>71019069.0</td>\n",
" <td>73739117.0</td>\n",
" <td>76368453.0</td>\n",
" <td>78717088.0</td>\n",
" <td>78160773.0</td>\n",
" <td>78335266.0</td>\n",
" <td>77718298.0</td>\n",
" <td>80597764.0</td>\n",
" <td>82011073.0</td>\n",
" <td>82350671</td>\n",
" <td>82400996</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Iceland</th>\n",
" <td>Europe</td>\n",
" <td>Iceland</td>\n",
" <td>7267.688428</td>\n",
" <td>9244.001412</td>\n",
" <td>10350.159060</td>\n",
" <td>13319.895680</td>\n",
" <td>15798.063620</td>\n",
" <td>19654.96247</td>\n",
" <td>23269.60750</td>\n",
" <td>26923.20628</td>\n",
" <td>25144.39201</td>\n",
" <td>28061.09966</td>\n",
" <td>31163.20196</td>\n",
" <td>36180.78919</td>\n",
" <td>72.490</td>\n",
" <td>73.470</td>\n",
" <td>73.680</td>\n",
" <td>73.730</td>\n",
" <td>74.460</td>\n",
" <td>76.110</td>\n",
" <td>76.990</td>\n",
" <td>77.230</td>\n",
" <td>78.770</td>\n",
" <td>78.950</td>\n",
" <td>80.500</td>\n",
" <td>81.757</td>\n",
" <td>147962.0</td>\n",
" <td>165110.0</td>\n",
" <td>182053.0</td>\n",
" <td>198676.0</td>\n",
" <td>209275.0</td>\n",
" <td>221823.0</td>\n",
" <td>233997.0</td>\n",
" <td>244676.0</td>\n",
" <td>259012.0</td>\n",
" <td>271192.0</td>\n",
" <td>288030</td>\n",
" <td>301931</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Ireland</th>\n",
" <td>Europe</td>\n",
" <td>Ireland</td>\n",
" <td>5210.280328</td>\n",
" <td>5599.077872</td>\n",
" <td>6631.597314</td>\n",
" <td>7655.568963</td>\n",
" <td>9530.772896</td>\n",
" <td>11150.98113</td>\n",
" <td>12618.32141</td>\n",
" <td>13872.86652</td>\n",
" <td>17558.81555</td>\n",
" <td>24521.94713</td>\n",
" <td>34077.04939</td>\n",
" <td>40675.99635</td>\n",
" <td>66.910</td>\n",
" <td>68.900</td>\n",
" <td>70.290</td>\n",
" <td>71.080</td>\n",
" <td>71.280</td>\n",
" <td>72.030</td>\n",
" <td>73.100</td>\n",
" <td>74.360</td>\n",
" <td>75.467</td>\n",
" <td>76.122</td>\n",
" <td>77.783</td>\n",
" <td>78.885</td>\n",
" <td>2952156.0</td>\n",
" <td>2878220.0</td>\n",
" <td>2830000.0</td>\n",
" <td>2900100.0</td>\n",
" <td>3024400.0</td>\n",
" <td>3271900.0</td>\n",
" <td>3480000.0</td>\n",
" <td>3539900.0</td>\n",
" <td>3557761.0</td>\n",
" <td>3667233.0</td>\n",
" <td>3879155</td>\n",
" <td>4109086</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Netherlands</th>\n",
" <td>Europe</td>\n",
" <td>Netherlands</td>\n",
" <td>8941.571858</td>\n",
" <td>11276.193440</td>\n",
" <td>12790.849560</td>\n",
" <td>15363.251360</td>\n",
" <td>18794.745670</td>\n",
" <td>21209.05920</td>\n",
" <td>21399.46046</td>\n",
" <td>23651.32361</td>\n",
" <td>26790.94961</td>\n",
" <td>30246.13063</td>\n",
" <td>33724.75778</td>\n",
" <td>36797.93332</td>\n",
" <td>72.130</td>\n",
" <td>72.990</td>\n",
" <td>73.230</td>\n",
" <td>73.820</td>\n",
" <td>73.750</td>\n",
" <td>75.240</td>\n",
" <td>76.050</td>\n",
" <td>76.830</td>\n",
" <td>77.420</td>\n",
" <td>78.030</td>\n",
" <td>78.530</td>\n",
" <td>79.762</td>\n",
" <td>10381988.0</td>\n",
" <td>11026383.0</td>\n",
" <td>11805689.0</td>\n",
" <td>12596822.0</td>\n",
" <td>13329874.0</td>\n",
" <td>13852989.0</td>\n",
" <td>14310401.0</td>\n",
" <td>14665278.0</td>\n",
" <td>15174244.0</td>\n",
" <td>15604464.0</td>\n",
" <td>16122830</td>\n",
" <td>16570613</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Norway</th>\n",
" <td>Europe</td>\n",
" <td>Norway</td>\n",
" <td>10095.421720</td>\n",
" <td>11653.973040</td>\n",
" <td>13450.401510</td>\n",
" <td>16361.876470</td>\n",
" <td>18965.055510</td>\n",
" <td>23311.34939</td>\n",
" <td>26298.63531</td>\n",
" <td>31540.97480</td>\n",
" <td>33965.66115</td>\n",
" <td>41283.16433</td>\n",
" <td>44683.97525</td>\n",
" <td>49357.19017</td>\n",
" <td>72.670</td>\n",
" <td>73.440</td>\n",
" <td>73.470</td>\n",
" <td>74.080</td>\n",
" <td>74.340</td>\n",
" <td>75.370</td>\n",
" <td>75.970</td>\n",
" <td>75.890</td>\n",
" <td>77.320</td>\n",
" <td>78.320</td>\n",
" <td>79.050</td>\n",
" <td>80.196</td>\n",
" <td>3327728.0</td>\n",
" <td>3491938.0</td>\n",
" <td>3638919.0</td>\n",
" <td>3786019.0</td>\n",
" <td>3933004.0</td>\n",
" <td>4043205.0</td>\n",
" <td>4114787.0</td>\n",
" <td>4186147.0</td>\n",
" <td>4286357.0</td>\n",
" <td>4405672.0</td>\n",
" <td>4535591</td>\n",
" <td>4627926</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Sweden</th>\n",
" <td>Europe</td>\n",
" <td>Sweden</td>\n",
" <td>8527.844662</td>\n",
" <td>9911.878226</td>\n",
" <td>12329.441920</td>\n",
" <td>15258.296970</td>\n",
" <td>17832.024640</td>\n",
" <td>18855.72521</td>\n",
" <td>20667.38125</td>\n",
" <td>23586.92927</td>\n",
" <td>23880.01683</td>\n",
" <td>25266.59499</td>\n",
" <td>29341.63093</td>\n",
" <td>33859.74835</td>\n",
" <td>71.860</td>\n",
" <td>72.490</td>\n",
" <td>73.370</td>\n",
" <td>74.160</td>\n",
" <td>74.720</td>\n",
" <td>75.440</td>\n",
" <td>76.420</td>\n",
" <td>77.190</td>\n",
" <td>78.160</td>\n",
" <td>79.390</td>\n",
" <td>80.040</td>\n",
" <td>80.884</td>\n",
" <td>7124673.0</td>\n",
" <td>7363802.0</td>\n",
" <td>7561588.0</td>\n",
" <td>7867931.0</td>\n",
" <td>8122293.0</td>\n",
" <td>8251648.0</td>\n",
" <td>8325260.0</td>\n",
" <td>8421403.0</td>\n",
" <td>8718867.0</td>\n",
" <td>8897619.0</td>\n",
" <td>8954175</td>\n",
" <td>9031088</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Switzerland</th>\n",
" <td>Europe</td>\n",
" <td>Switzerland</td>\n",
" <td>14734.232750</td>\n",
" <td>17909.489730</td>\n",
" <td>20431.092700</td>\n",
" <td>22966.144320</td>\n",
" <td>27195.113040</td>\n",
" <td>26982.29052</td>\n",
" <td>28397.71512</td>\n",
" <td>30281.70459</td>\n",
" <td>31871.53030</td>\n",
" <td>32135.32301</td>\n",
" <td>34480.95771</td>\n",
" <td>37506.41907</td>\n",
" <td>69.620</td>\n",
" <td>70.560</td>\n",
" <td>71.320</td>\n",
" <td>72.770</td>\n",
" <td>73.780</td>\n",
" <td>75.390</td>\n",
" <td>76.210</td>\n",
" <td>77.410</td>\n",
" <td>78.030</td>\n",
" <td>79.370</td>\n",
" <td>80.620</td>\n",
" <td>81.701</td>\n",
" <td>4815000.0</td>\n",
" <td>5126000.0</td>\n",
" <td>5666000.0</td>\n",
" <td>6063000.0</td>\n",
" <td>6401400.0</td>\n",
" <td>6316424.0</td>\n",
" <td>6468126.0</td>\n",
" <td>6649942.0</td>\n",
" <td>6995447.0</td>\n",
" <td>7193761.0</td>\n",
" <td>7361757</td>\n",
" <td>7554661</td>\n",
" </tr>\n",
" <tr>\n",
" <th>United Kingdom</th>\n",
" <td>Europe</td>\n",
" <td>United Kingdom</td>\n",
" <td>9979.508487</td>\n",
" <td>11283.177950</td>\n",
" <td>12477.177070</td>\n",
" <td>14142.850890</td>\n",
" <td>15895.116410</td>\n",
" <td>17428.74846</td>\n",
" <td>18232.42452</td>\n",
" <td>21664.78767</td>\n",
" <td>22705.09254</td>\n",
" <td>26074.53136</td>\n",
" <td>29478.99919</td>\n",
" <td>33203.26128</td>\n",
" <td>69.180</td>\n",
" <td>70.420</td>\n",
" <td>70.760</td>\n",
" <td>71.360</td>\n",
" <td>72.010</td>\n",
" <td>72.760</td>\n",
" <td>74.040</td>\n",
" <td>75.007</td>\n",
" <td>76.420</td>\n",
" <td>77.218</td>\n",
" <td>78.471</td>\n",
" <td>79.425</td>\n",
" <td>50430000.0</td>\n",
" <td>51430000.0</td>\n",
" <td>53292000.0</td>\n",
" <td>54959000.0</td>\n",
" <td>56079000.0</td>\n",
" <td>56179000.0</td>\n",
" <td>56339704.0</td>\n",
" <td>56981620.0</td>\n",
" <td>57866349.0</td>\n",
" <td>58808266.0</td>\n",
" <td>59912431</td>\n",
" <td>60776238</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Australia</th>\n",
" <td>Oceania</td>\n",
" <td>Australia</td>\n",
" <td>10039.595640</td>\n",
" <td>10949.649590</td>\n",
" <td>12217.226860</td>\n",
" <td>14526.124650</td>\n",
" <td>16788.629480</td>\n",
" <td>18334.19751</td>\n",
" <td>19477.00928</td>\n",
" <td>21888.88903</td>\n",
" <td>23424.76683</td>\n",
" <td>26997.93657</td>\n",
" <td>30687.75473</td>\n",
" <td>34435.36744</td>\n",
" <td>69.120</td>\n",
" <td>70.330</td>\n",
" <td>70.930</td>\n",
" <td>71.100</td>\n",
" <td>71.930</td>\n",
" <td>73.490</td>\n",
" <td>74.740</td>\n",
" <td>76.320</td>\n",
" <td>77.560</td>\n",
" <td>78.830</td>\n",
" <td>80.370</td>\n",
" <td>81.235</td>\n",
" <td>8691212.0</td>\n",
" <td>9712569.0</td>\n",
" <td>10794968.0</td>\n",
" <td>11872264.0</td>\n",
" <td>13177000.0</td>\n",
" <td>14074100.0</td>\n",
" <td>15184200.0</td>\n",
" <td>16257249.0</td>\n",
" <td>17481977.0</td>\n",
" <td>18565243.0</td>\n",
" <td>19546792</td>\n",
" <td>20434176</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" continent country ... pop_2002 pop_2007\n",
"country ... \n",
"Canada Americas Canada ... 31902268 33390141\n",
"United States Americas United States ... 287675526 301139947\n",
"Hong Kong China Asia Hong Kong China ... 6762476 6980412\n",
"Japan Asia Japan ... 127065841 127467972\n",
"Kuwait Asia Kuwait ... 2111561 2505559\n",
"Singapore Asia Singapore ... 4197776 4553009\n",
"Austria Europe Austria ... 8148312 8199783\n",
"Belgium Europe Belgium ... 10311970 10392226\n",
"Denmark Europe Denmark ... 5374693 5468120\n",
"Finland Europe Finland ... 5193039 5238460\n",
"France Europe France ... 59925035 61083916\n",
"Germany Europe Germany ... 82350671 82400996\n",
"Iceland Europe Iceland ... 288030 301931\n",
"Ireland Europe Ireland ... 3879155 4109086\n",
"Netherlands Europe Netherlands ... 16122830 16570613\n",
"Norway Europe Norway ... 4535591 4627926\n",
"Sweden Europe Sweden ... 8954175 9031088\n",
"Switzerland Europe Switzerland ... 7361757 7554661\n",
"United Kingdom Europe United Kingdom ... 59912431 60776238\n",
"Australia Oceania Australia ... 19546792 20434176\n",
"\n",
"[20 rows x 38 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 43
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "rtEIyRB3F3P8"
},
"source": [
"mask = df > df.mean()"
],
"execution_count": 46,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "pN2ze6Y2GpQM"
},
"source": [
"wealthScore = mask.aggregate('sum', axis=1) / len(df.columns)"
],
"execution_count": 51,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 254
},
"id": "soeiP4jNHS3W",
"outputId": "78a8c986-b4a8-460c-ff25-5f7ebbfa34db"
},
"source": [
"df.groupby('continent').sum()"
],
"execution_count": 57,
"outputs": [
{
"output_type": "execute_result",
"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>gdpPercap_1952</th>\n",
" <th>gdpPercap_1957</th>\n",
" <th>gdpPercap_1962</th>\n",
" <th>gdpPercap_1967</th>\n",
" <th>gdpPercap_1972</th>\n",
" <th>gdpPercap_1977</th>\n",
" <th>gdpPercap_1982</th>\n",
" <th>gdpPercap_1987</th>\n",
" <th>gdpPercap_1992</th>\n",
" <th>gdpPercap_1997</th>\n",
" <th>gdpPercap_2002</th>\n",
" <th>gdpPercap_2007</th>\n",
" <th>lifeExp_1952</th>\n",
" <th>lifeExp_1957</th>\n",
" <th>lifeExp_1962</th>\n",
" <th>lifeExp_1967</th>\n",
" <th>lifeExp_1972</th>\n",
" <th>lifeExp_1977</th>\n",
" <th>lifeExp_1982</th>\n",
" <th>lifeExp_1987</th>\n",
" <th>lifeExp_1992</th>\n",
" <th>lifeExp_1997</th>\n",
" <th>lifeExp_2002</th>\n",
" <th>lifeExp_2007</th>\n",
" <th>pop_1952</th>\n",
" <th>pop_1957</th>\n",
" <th>pop_1962</th>\n",
" <th>pop_1967</th>\n",
" <th>pop_1972</th>\n",
" <th>pop_1977</th>\n",
" <th>pop_1982</th>\n",
" <th>pop_1987</th>\n",
" <th>pop_1992</th>\n",
" <th>pop_1997</th>\n",
" <th>pop_2002</th>\n",
" <th>pop_2007</th>\n",
" </tr>\n",
" <tr>\n",
" <th>continent</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Africa</th>\n",
" <td>65133.768223</td>\n",
" <td>72032.275237</td>\n",
" <td>83100.098892</td>\n",
" <td>106618.917645</td>\n",
" <td>121660.015058</td>\n",
" <td>134468.802440</td>\n",
" <td>129042.833907</td>\n",
" <td>118698.787546</td>\n",
" <td>118654.137329</td>\n",
" <td>123695.496865</td>\n",
" <td>135168.028262</td>\n",
" <td>160629.695446</td>\n",
" <td>2035.046</td>\n",
" <td>2145.85000</td>\n",
" <td>2252.61100</td>\n",
" <td>2357.39600</td>\n",
" <td>2467.44900</td>\n",
" <td>2578.18200</td>\n",
" <td>2682.829</td>\n",
" <td>2773.929</td>\n",
" <td>2788.738</td>\n",
" <td>2787.110</td>\n",
" <td>2772.912</td>\n",
" <td>2849.914</td>\n",
" <td>2.376405e+08</td>\n",
" <td>2.648377e+08</td>\n",
" <td>2.965169e+08</td>\n",
" <td>3.352895e+08</td>\n",
" <td>3.798795e+08</td>\n",
" <td>4.330610e+08</td>\n",
" <td>4.993486e+08</td>\n",
" <td>5.748341e+08</td>\n",
" <td>6.590815e+08</td>\n",
" <td>7.438330e+08</td>\n",
" <td>833723916</td>\n",
" <td>929539692</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Americas</th>\n",
" <td>101976.563805</td>\n",
" <td>115401.093329</td>\n",
" <td>122538.546760</td>\n",
" <td>141706.337401</td>\n",
" <td>162283.353476</td>\n",
" <td>183800.178157</td>\n",
" <td>187668.427202</td>\n",
" <td>194835.006528</td>\n",
" <td>201123.360138</td>\n",
" <td>222232.521564</td>\n",
" <td>232191.927683</td>\n",
" <td>275075.790634</td>\n",
" <td>1331.996</td>\n",
" <td>1399.00700</td>\n",
" <td>1459.96900</td>\n",
" <td>1510.27300</td>\n",
" <td>1559.87300</td>\n",
" <td>1609.78900</td>\n",
" <td>1655.721</td>\n",
" <td>1702.268</td>\n",
" <td>1739.209</td>\n",
" <td>1778.762</td>\n",
" <td>1810.551</td>\n",
" <td>1840.203</td>\n",
" <td>3.451524e+08</td>\n",
" <td>3.869539e+08</td>\n",
" <td>4.332703e+08</td>\n",
" <td>4.807466e+08</td>\n",
" <td>5.293842e+08</td>\n",
" <td>5.780677e+08</td>\n",
" <td>6.302909e+08</td>\n",
" <td>6.827540e+08</td>\n",
" <td>7.392741e+08</td>\n",
" <td>7.969004e+08</td>\n",
" <td>849772762</td>\n",
" <td>898871184</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Asia</th>\n",
" <td>171450.972133</td>\n",
" <td>190995.187018</td>\n",
" <td>189069.197618</td>\n",
" <td>197048.721329</td>\n",
" <td>270186.467082</td>\n",
" <td>257113.362658</td>\n",
" <td>245326.460197</td>\n",
" <td>251071.474755</td>\n",
" <td>285109.778175</td>\n",
" <td>324525.078743</td>\n",
" <td>335744.983087</td>\n",
" <td>411609.886714</td>\n",
" <td>1528.375</td>\n",
" <td>1627.51196</td>\n",
" <td>1701.58636</td>\n",
" <td>1803.90012</td>\n",
" <td>1891.53588</td>\n",
" <td>1967.14836</td>\n",
" <td>2066.392</td>\n",
" <td>2140.089</td>\n",
" <td>2195.728</td>\n",
" <td>2244.677</td>\n",
" <td>2284.718</td>\n",
" <td>2334.040</td>\n",
" <td>1.395357e+09</td>\n",
" <td>1.562781e+09</td>\n",
" <td>1.696357e+09</td>\n",
" <td>1.905663e+09</td>\n",
" <td>2.150972e+09</td>\n",
" <td>2.384514e+09</td>\n",
" <td>2.610136e+09</td>\n",
" <td>2.871221e+09</td>\n",
" <td>3.133292e+09</td>\n",
" <td>3.383286e+09</td>\n",
" <td>3601802203</td>\n",
" <td>3811953827</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Europe</th>\n",
" <td>169831.723043</td>\n",
" <td>208890.384478</td>\n",
" <td>250964.604429</td>\n",
" <td>304314.712696</td>\n",
" <td>374387.257394</td>\n",
" <td>428519.373288</td>\n",
" <td>468536.896537</td>\n",
" <td>516429.321799</td>\n",
" <td>511847.042526</td>\n",
" <td>572303.454048</td>\n",
" <td>651351.972673</td>\n",
" <td>751634.449078</td>\n",
" <td>1932.255</td>\n",
" <td>2001.09200</td>\n",
" <td>2056.17700</td>\n",
" <td>2092.12800</td>\n",
" <td>2123.25100</td>\n",
" <td>2158.13300</td>\n",
" <td>2184.192</td>\n",
" <td>2209.265</td>\n",
" <td>2233.203</td>\n",
" <td>2265.155</td>\n",
" <td>2301.018</td>\n",
" <td>2329.458</td>\n",
" <td>4.181208e+08</td>\n",
" <td>4.378904e+08</td>\n",
" <td>4.603552e+08</td>\n",
" <td>4.811790e+08</td>\n",
" <td>5.006351e+08</td>\n",
" <td>5.171645e+08</td>\n",
" <td>5.312669e+08</td>\n",
" <td>5.430942e+08</td>\n",
" <td>5.581428e+08</td>\n",
" <td>5.689441e+08</td>\n",
" <td>578223869</td>\n",
" <td>586098529</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Oceania</th>\n",
" <td>20596.171300</td>\n",
" <td>23197.044910</td>\n",
" <td>25392.904860</td>\n",
" <td>28990.043580</td>\n",
" <td>32834.666760</td>\n",
" <td>34567.915210</td>\n",
" <td>37109.419680</td>\n",
" <td>40896.080320</td>\n",
" <td>41788.091770</td>\n",
" <td>48048.350340</td>\n",
" <td>53877.556080</td>\n",
" <td>59620.376550</td>\n",
" <td>138.510</td>\n",
" <td>140.59000</td>\n",
" <td>142.17000</td>\n",
" <td>142.62000</td>\n",
" <td>143.82000</td>\n",
" <td>145.71000</td>\n",
" <td>148.580</td>\n",
" <td>150.640</td>\n",
" <td>153.890</td>\n",
" <td>156.380</td>\n",
" <td>159.480</td>\n",
" <td>161.439</td>\n",
" <td>1.068601e+07</td>\n",
" <td>1.194198e+07</td>\n",
" <td>1.328352e+07</td>\n",
" <td>1.460041e+07</td>\n",
" <td>1.610610e+07</td>\n",
" <td>1.723900e+07</td>\n",
" <td>1.839485e+07</td>\n",
" <td>1.957442e+07</td>\n",
" <td>2.091965e+07</td>\n",
" <td>2.224143e+07</td>\n",
" <td>23454829</td>\n",
" <td>24549947</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" gdpPercap_1952 gdpPercap_1957 ... pop_2002 pop_2007\n",
"continent ... \n",
"Africa 65133.768223 72032.275237 ... 833723916 929539692\n",
"Americas 101976.563805 115401.093329 ... 849772762 898871184\n",
"Asia 171450.972133 190995.187018 ... 3601802203 3811953827\n",
"Europe 169831.723043 208890.384478 ... 578223869 586098529\n",
"Oceania 20596.171300 23197.044910 ... 23454829 24549947\n",
"\n",
"[5 rows x 36 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 57
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "YfUkoW98JIu8"
},
"source": [
"df['gdpPercap_1982']"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "jUncfQd4NoBm"
},
"source": [
"df.loc['Denmark']['gdpPercap_1952':'gdpPercap_2007']"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 448
},
"id": "bD7YUwxONrBX",
"outputId": "d37961cb-141d-4977-dfb3-86f61b7d8b6b"
},
"source": [
"df.loc[:,'gdpPercap_1987':'gdpPercap_2007']"
],
"execution_count": 64,
"outputs": [
{
"output_type": "execute_result",
"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>gdpPercap_1987</th>\n",
" <th>gdpPercap_1992</th>\n",
" <th>gdpPercap_1997</th>\n",
" <th>gdpPercap_2002</th>\n",
" <th>gdpPercap_2007</th>\n",
" </tr>\n",
" <tr>\n",
" <th>country</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Algeria</th>\n",
" <td>5681.358539</td>\n",
" <td>5023.216647</td>\n",
" <td>4797.295051</td>\n",
" <td>5288.040382</td>\n",
" <td>6223.367465</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Angola</th>\n",
" <td>2430.208311</td>\n",
" <td>2627.845685</td>\n",
" <td>2277.140884</td>\n",
" <td>2773.287312</td>\n",
" <td>4797.231267</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Benin</th>\n",
" <td>1225.856010</td>\n",
" <td>1191.207681</td>\n",
" <td>1232.975292</td>\n",
" <td>1372.877931</td>\n",
" <td>1441.284873</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Botswana</th>\n",
" <td>6205.883850</td>\n",
" <td>7954.111645</td>\n",
" <td>8647.142313</td>\n",
" <td>11003.605080</td>\n",
" <td>12569.851770</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Burkina Faso</th>\n",
" <td>912.063142</td>\n",
" <td>931.752773</td>\n",
" <td>946.294962</td>\n",
" <td>1037.645221</td>\n",
" <td>1217.032994</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Switzerland</th>\n",
" <td>30281.704590</td>\n",
" <td>31871.530300</td>\n",
" <td>32135.323010</td>\n",
" <td>34480.957710</td>\n",
" <td>37506.419070</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Turkey</th>\n",
" <td>5089.043686</td>\n",
" <td>5678.348271</td>\n",
" <td>6601.429915</td>\n",
" <td>6508.085718</td>\n",
" <td>8458.276384</td>\n",
" </tr>\n",
" <tr>\n",
" <th>United Kingdom</th>\n",
" <td>21664.787670</td>\n",
" <td>22705.092540</td>\n",
" <td>26074.531360</td>\n",
" <td>29478.999190</td>\n",
" <td>33203.261280</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Australia</th>\n",
" <td>21888.889030</td>\n",
" <td>23424.766830</td>\n",
" <td>26997.936570</td>\n",
" <td>30687.754730</td>\n",
" <td>34435.367440</td>\n",
" </tr>\n",
" <tr>\n",
" <th>New Zealand</th>\n",
" <td>19007.191290</td>\n",
" <td>18363.324940</td>\n",
" <td>21050.413770</td>\n",
" <td>23189.801350</td>\n",
" <td>25185.009110</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>142 rows × 5 columns</p>\n",
"</div>"
],
"text/plain": [
" gdpPercap_1987 gdpPercap_1992 ... gdpPercap_2002 gdpPercap_2007\n",
"country ... \n",
"Algeria 5681.358539 5023.216647 ... 5288.040382 6223.367465\n",
"Angola 2430.208311 2627.845685 ... 2773.287312 4797.231267\n",
"Benin 1225.856010 1191.207681 ... 1372.877931 1441.284873\n",
"Botswana 6205.883850 7954.111645 ... 11003.605080 12569.851770\n",
"Burkina Faso 912.063142 931.752773 ... 1037.645221 1217.032994\n",
"... ... ... ... ... ...\n",
"Switzerland 30281.704590 31871.530300 ... 34480.957710 37506.419070\n",
"Turkey 5089.043686 5678.348271 ... 6508.085718 8458.276384\n",
"United Kingdom 21664.787670 22705.092540 ... 29478.999190 33203.261280\n",
"Australia 21888.889030 23424.766830 ... 30687.754730 34435.367440\n",
"New Zealand 19007.191290 18363.324940 ... 23189.801350 25185.009110\n",
"\n",
"[142 rows x 5 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 64
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 448
},
"id": "iQ-KtNfXUp9o",
"outputId": "dbccd466-e6c7-4fd3-a4f8-af7ee3538bdf"
},
"source": [
"colsAfter1985 = [col for col in df.columns if col.startswith('gdp') and int(col[-4:]) > 1985]\n",
"df[colsAfter1985]"
],
"execution_count": 102,
"outputs": [
{
"output_type": "execute_result",
"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>gdpPercap_1987</th>\n",
" <th>gdpPercap_1992</th>\n",
" <th>gdpPercap_1997</th>\n",
" <th>gdpPercap_2002</th>\n",
" <th>gdpPercap_2007</th>\n",
" </tr>\n",
" <tr>\n",
" <th>country</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Algeria</th>\n",
" <td>5681.358539</td>\n",
" <td>5023.216647</td>\n",
" <td>4797.295051</td>\n",
" <td>5288.040382</td>\n",
" <td>6223.367465</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Angola</th>\n",
" <td>2430.208311</td>\n",
" <td>2627.845685</td>\n",
" <td>2277.140884</td>\n",
" <td>2773.287312</td>\n",
" <td>4797.231267</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Benin</th>\n",
" <td>1225.856010</td>\n",
" <td>1191.207681</td>\n",
" <td>1232.975292</td>\n",
" <td>1372.877931</td>\n",
" <td>1441.284873</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Botswana</th>\n",
" <td>6205.883850</td>\n",
" <td>7954.111645</td>\n",
" <td>8647.142313</td>\n",
" <td>11003.605080</td>\n",
" <td>12569.851770</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Burkina Faso</th>\n",
" <td>912.063142</td>\n",
" <td>931.752773</td>\n",
" <td>946.294962</td>\n",
" <td>1037.645221</td>\n",
" <td>1217.032994</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Switzerland</th>\n",
" <td>30281.704590</td>\n",
" <td>31871.530300</td>\n",
" <td>32135.323010</td>\n",
" <td>34480.957710</td>\n",
" <td>37506.419070</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Turkey</th>\n",
" <td>5089.043686</td>\n",
" <td>5678.348271</td>\n",
" <td>6601.429915</td>\n",
" <td>6508.085718</td>\n",
" <td>8458.276384</td>\n",
" </tr>\n",
" <tr>\n",
" <th>United Kingdom</th>\n",
" <td>21664.787670</td>\n",
" <td>22705.092540</td>\n",
" <td>26074.531360</td>\n",
" <td>29478.999190</td>\n",
" <td>33203.261280</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Australia</th>\n",
" <td>21888.889030</td>\n",
" <td>23424.766830</td>\n",
" <td>26997.936570</td>\n",
" <td>30687.754730</td>\n",
" <td>34435.367440</td>\n",
" </tr>\n",
" <tr>\n",
" <th>New Zealand</th>\n",
" <td>19007.191290</td>\n",
" <td>18363.324940</td>\n",
" <td>21050.413770</td>\n",
" <td>23189.801350</td>\n",
" <td>25185.009110</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>142 rows × 5 columns</p>\n",
"</div>"
],
"text/plain": [
" gdpPercap_1987 gdpPercap_1992 ... gdpPercap_2002 gdpPercap_2007\n",
"country ... \n",
"Algeria 5681.358539 5023.216647 ... 5288.040382 6223.367465\n",
"Angola 2430.208311 2627.845685 ... 2773.287312 4797.231267\n",
"Benin 1225.856010 1191.207681 ... 1372.877931 1441.284873\n",
"Botswana 6205.883850 7954.111645 ... 11003.605080 12569.851770\n",
"Burkina Faso 912.063142 931.752773 ... 1037.645221 1217.032994\n",
"... ... ... ... ... ...\n",
"Switzerland 30281.704590 31871.530300 ... 34480.957710 37506.419070\n",
"Turkey 5089.043686 5678.348271 ... 6508.085718 8458.276384\n",
"United Kingdom 21664.787670 22705.092540 ... 29478.999190 33203.261280\n",
"Australia 21888.889030 23424.766830 ... 30687.754730 34435.367440\n",
"New Zealand 19007.191290 18363.324940 ... 23189.801350 25185.009110\n",
"\n",
"[142 rows x 5 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 102
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "6CkzGj74OOrx"
},
"source": [
"difference1952 = df['gdpPercap_2007'] / df['gdpPercap_1952']"
],
"execution_count": 105,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "cLOti3BaOdbd",
"outputId": "68c71fd9-33ec-43e2-f61f-4afe19706634"
},
"source": [
"difference1952.max()"
],
"execution_count": 106,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"32.35541662442322"
]
},
"metadata": {
"tags": []
},
"execution_count": 106
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "MVYuboT8PJ1S",
"outputId": "a539c875-19f1-4e9b-c67d-9fef3709eb10"
},
"source": [
"difference1952.argmax()"
],
"execution_count": 107,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"15"
]
},
"metadata": {
"tags": []
},
"execution_count": 107
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NekKXDrkV-BC",
"outputId": "30e63c8b-1edd-4813-cbf9-426b85a767db"
},
"source": [
"difference1952.index"
],
"execution_count": 112,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"Index(['Algeria', 'Angola', 'Benin', 'Botswana', 'Burkina Faso', 'Burundi',\n",
" 'Cameroon', 'Central African Republic', 'Chad', 'Comoros',\n",
" ...\n",
" 'Serbia', 'Slovak Republic', 'Slovenia', 'Spain', 'Sweden',\n",
" 'Switzerland', 'Turkey', 'United Kingdom', 'Australia', 'New Zealand'],\n",
" dtype='object', name='country', length=142)"
]
},
"metadata": {
"tags": []
},
"execution_count": 112
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "keVFqkesWBgc",
"outputId": "2a3262ca-06c0-4e7d-8475-edab2b07f4cb"
},
"source": [
"difference1952[difference1952 > 10]"
],
"execution_count": 111,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"country\n",
"Botswana 14.766499\n",
"Equatorial Guinea 32.355417\n",
"China 12.383898\n",
"Hong Kong China 13.005730\n",
"Korea Rep. 22.655071\n",
"Oman 12.206445\n",
"Singapore 20.363009\n",
"Taiwan 23.794131\n",
"dtype: float64"
]
},
"metadata": {
"tags": []
},
"execution_count": 111
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "fAZlVOQkW8i4"
},
"source": [
"# Lists"
]
},
{
"cell_type": "code",
"metadata": {
"id": "XZZqbj0mWJpc"
},
"source": [
"fruit = [\"apples\", \"oranges\", \"bananas\", \"kiwis\"]"
],
"execution_count": 113,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "reKawh8OXByo",
"outputId": "85d68277-eb06-4c2d-e669-20685fc79d85"
},
"source": [
"type(fruit)"
],
"execution_count": 114,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"list"
]
},
"metadata": {
"tags": []
},
"execution_count": 114
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "CI3LUxYUXEu4"
},
"source": [
"fruit.append(\"dragonfruit\")"
],
"execution_count": 115,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "fvq2iUU7XUEf",
"outputId": "4a59d6d5-aeae-45af-9698-2d60444b91cc"
},
"source": [
"fruit"
],
"execution_count": 116,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['apples', 'oranges', 'bananas', 'kiwis', 'dragonfruit']"
]
},
"metadata": {
"tags": []
},
"execution_count": 116
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "phmPfBjAXZGW"
},
"source": [
"name = \"Jonathan\" "
],
"execution_count": 118,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "vBnqw_FhXeat",
"outputId": "be8d28de-a3ce-4126-d61f-15824698f478"
},
"source": [
"name + \" Reeve\""
],
"execution_count": 119,
"outputs": [
{
"output_type": "execute_result",
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
},
"text/plain": [
"'Jonathan Reeve'"
]
},
"metadata": {
"tags": []
},
"execution_count": 119
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "nSFa_joKXitZ",
"outputId": "d2f6c081-699b-433e-d047-e9e2a732f5bd"
},
"source": [
"name"
],
"execution_count": 120,
"outputs": [
{
"output_type": "execute_result",
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
},
"text/plain": [
"'Jonathan'"
]
},
"metadata": {
"tags": []
},
"execution_count": 120
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "snYxDIIhXkeZ"
},
"source": [
"fruit.reverse()"
],
"execution_count": 122,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Vv2yC-qBXrtd",
"outputId": "9c829784-9149-4182-b9c7-15b3c1fa0086"
},
"source": [
"fruit"
],
"execution_count": 123,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['dragonfruit', 'kiwis', 'bananas', 'oranges', 'apples']"
]
},
"metadata": {
"tags": []
},
"execution_count": 123
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "fOb5pGmpXwZ0"
},
"source": [
"fruit.sort()"
],
"execution_count": 124,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "7cTc7FI0X2XR",
"outputId": "858b2d12-2e8e-498e-b2d5-ddf573aba932"
},
"source": [
"fruit"
],
"execution_count": 125,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['apples', 'bananas', 'dragonfruit', 'kiwis', 'oranges']"
]
},
"metadata": {
"tags": []
},
"execution_count": 125
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "-y4si697X3LQ"
},
"source": [
"fruit = []\n",
"fruit.append('apples')\n",
"fruit.append('bananas')\n",
"fruit.append('dragonfruit')"
],
"execution_count": 128,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "HhqeNLahYIRl",
"outputId": "6683a58a-123c-4e9d-c269-5eb0d70f1be2"
},
"source": [
"fruit.pop()"
],
"execution_count": 130,
"outputs": [
{
"output_type": "execute_result",
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
},
"text/plain": [
"'dragonfruit'"
]
},
"metadata": {
"tags": []
},
"execution_count": 130
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "vAhtFhkPYKnL",
"outputId": "cfaa96e6-af46-482b-9e33-fc1696257f82"
},
"source": [
"fruit"
],
"execution_count": 131,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['apples', 'bananas']"
]
},
"metadata": {
"tags": []
},
"execution_count": 131
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "B2DGhru5YQOj"
},
"source": [
"fruit = [\"apples\", \"apples\", \"apples\", \"strawberries\"]"
],
"execution_count": 132,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "RzvKiB0GYWKb",
"outputId": "1340eb31-1312-4e72-e32a-54e873f74f9e"
},
"source": [
"fruit.count('apples')"
],
"execution_count": 133,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"3"
]
},
"metadata": {
"tags": []
},
"execution_count": 133
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "2IPPF_TxYZBi",
"outputId": "3fc88cd2-7e8f-4474-8096-744ae6ece0ea"
},
"source": [
"fruit.index(\"strawberries\")"
],
"execution_count": 134,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"3"
]
},
"metadata": {
"tags": []
},
"execution_count": 134
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "uQznbhOPYf2W",
"outputId": "aab6092e-3cf3-4969-a3e2-e6bf3f1dd145"
},
"source": [
"fruit[3]"
],
"execution_count": 136,
"outputs": [
{
"output_type": "execute_result",
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
},
"text/plain": [
"'strawberries'"
]
},
"metadata": {
"tags": []
},
"execution_count": 136
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 165
},
"id": "gnvh3OpqYla9",
"outputId": "b5b1c369-1eb8-42d2-da47-079dd7202691"
},
"source": [
"fruit[5]"
],
"execution_count": 137,
"outputs": [
{
"output_type": "error",
"ename": "IndexError",
"evalue": "ignored",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-137-e1e0c0e02355>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mfruit\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m: list index out of range"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "0n0t36eCY30P"
},
"source": [
"fruit = \"apples, oranges, bananas, kiwis\".split(',')"
],
"execution_count": 160,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Q_a7TbzBZRdf",
"outputId": "ca8b468e-50dc-400b-81b6-711d0eb9938d"
},
"source": [
"fruit"
],
"execution_count": 161,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['apples', ' oranges', ' bananas', ' kiwis']"
]
},
"metadata": {
"tags": []
},
"execution_count": 161
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 35
},
"id": "UjxSs8w1ZVnO",
"outputId": "327661b0-2bfe-409e-b19c-fe629023d3fd"
},
"source": [
"', '.join(fruit)"
],
"execution_count": 141,
"outputs": [
{
"output_type": "execute_result",
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
},
"text/plain": [
"'apples, oranges, bananas, kiwis'"
]
},
"metadata": {
"tags": []
},
"execution_count": 141
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 165
},
"id": "SAmjJoJkZh6c",
"outputId": "79b0789a-e81e-4448-a1fc-ebb26e763bfb"
},
"source": [
"fruit.remove('oranges')"
],
"execution_count": 162,
"outputs": [
{
"output_type": "error",
"ename": "ValueError",
"evalue": "ignored",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-162-795efb29492c>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mfruit\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mremove\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'oranges'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mValueError\u001b[0m: list.remove(x): x not in list"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "gTvjOZjTZs1g",
"outputId": "f5e08974-ee2e-494f-ea84-48f4a3216f09"
},
"source": [
"fruit"
],
"execution_count": 143,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['apples', 'bananas', 'kiwis']"
]
},
"metadata": {
"tags": []
},
"execution_count": 143
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "yDH6Hc08ZtfC"
},
"source": [
"del fruit[1]"
],
"execution_count": 145,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "xsLmbHn7Z7A_",
"outputId": "11ae19ef-6691-4dbc-ccb7-b394bba8ed94"
},
"source": [
"fruit"
],
"execution_count": 146,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['apples', 'kiwis']"
]
},
"metadata": {
"tags": []
},
"execution_count": 146
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 519
},
"id": "XY6bdG4XZ92K",
"outputId": "9f04bc2b-a3b1-471b-c24e-77c30f479d34"
},
"source": [
"df.drop('Algeria')"
],
"execution_count": 153,
"outputs": [
{
"output_type": "execute_result",
"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>continent</th>\n",
" <th>country</th>\n",
" <th>gdpPercap_1952</th>\n",
" <th>gdpPercap_1957</th>\n",
" <th>gdpPercap_1962</th>\n",
" <th>gdpPercap_1967</th>\n",
" <th>gdpPercap_1972</th>\n",
" <th>gdpPercap_1977</th>\n",
" <th>gdpPercap_1982</th>\n",
" <th>gdpPercap_1987</th>\n",
" <th>gdpPercap_1992</th>\n",
" <th>gdpPercap_1997</th>\n",
" <th>gdpPercap_2002</th>\n",
" <th>gdpPercap_2007</th>\n",
" <th>lifeExp_1952</th>\n",
" <th>lifeExp_1957</th>\n",
" <th>lifeExp_1962</th>\n",
" <th>lifeExp_1967</th>\n",
" <th>lifeExp_1972</th>\n",
" <th>lifeExp_1977</th>\n",
" <th>lifeExp_1982</th>\n",
" <th>lifeExp_1987</th>\n",
" <th>lifeExp_1992</th>\n",
" <th>lifeExp_1997</th>\n",
" <th>lifeExp_2002</th>\n",
" <th>lifeExp_2007</th>\n",
" <th>pop_1952</th>\n",
" <th>pop_1957</th>\n",
" <th>pop_1962</th>\n",
" <th>pop_1967</th>\n",
" <th>pop_1972</th>\n",
" <th>pop_1977</th>\n",
" <th>pop_1982</th>\n",
" <th>pop_1987</th>\n",
" <th>pop_1992</th>\n",
" <th>pop_1997</th>\n",
" <th>pop_2002</th>\n",
" <th>pop_2007</th>\n",
" </tr>\n",
" <tr>\n",
" <th>country</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Angola</th>\n",
" <td>Africa</td>\n",
" <td>Angola</td>\n",
" <td>3520.610273</td>\n",
" <td>3827.940465</td>\n",
" <td>4269.276742</td>\n",
" <td>5522.776375</td>\n",
" <td>5473.288005</td>\n",
" <td>3008.647355</td>\n",
" <td>2756.953672</td>\n",
" <td>2430.208311</td>\n",
" <td>2627.845685</td>\n",
" <td>2277.140884</td>\n",
" <td>2773.287312</td>\n",
" <td>4797.231267</td>\n",
" <td>30.015</td>\n",
" <td>31.999</td>\n",
" <td>34.000</td>\n",
" <td>35.985</td>\n",
" <td>37.928</td>\n",
" <td>39.483</td>\n",
" <td>39.942</td>\n",
" <td>39.906</td>\n",
" <td>40.647</td>\n",
" <td>40.963</td>\n",
" <td>41.003</td>\n",
" <td>42.731</td>\n",
" <td>4232095.0</td>\n",
" <td>4561361.0</td>\n",
" <td>4826015.0</td>\n",
" <td>5247469.0</td>\n",
" <td>5894858.0</td>\n",
" <td>6162675.0</td>\n",
" <td>7016384.0</td>\n",
" <td>7874230.0</td>\n",
" <td>8735988.0</td>\n",
" <td>9875024.0</td>\n",
" <td>10866106</td>\n",
" <td>12420476</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Benin</th>\n",
" <td>Africa</td>\n",
" <td>Benin</td>\n",
" <td>1062.752200</td>\n",
" <td>959.601080</td>\n",
" <td>949.499064</td>\n",
" <td>1035.831411</td>\n",
" <td>1085.796879</td>\n",
" <td>1029.161251</td>\n",
" <td>1277.897616</td>\n",
" <td>1225.856010</td>\n",
" <td>1191.207681</td>\n",
" <td>1232.975292</td>\n",
" <td>1372.877931</td>\n",
" <td>1441.284873</td>\n",
" <td>38.223</td>\n",
" <td>40.358</td>\n",
" <td>42.618</td>\n",
" <td>44.885</td>\n",
" <td>47.014</td>\n",
" <td>49.190</td>\n",
" <td>50.904</td>\n",
" <td>52.337</td>\n",
" <td>53.919</td>\n",
" <td>54.777</td>\n",
" <td>54.406</td>\n",
" <td>56.728</td>\n",
" <td>1738315.0</td>\n",
" <td>1925173.0</td>\n",
" <td>2151895.0</td>\n",
" <td>2427334.0</td>\n",
" <td>2761407.0</td>\n",
" <td>3168267.0</td>\n",
" <td>3641603.0</td>\n",
" <td>4243788.0</td>\n",
" <td>4981671.0</td>\n",
" <td>6066080.0</td>\n",
" <td>7026113</td>\n",
" <td>8078314</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Botswana</th>\n",
" <td>Africa</td>\n",
" <td>Botswana</td>\n",
" <td>851.241141</td>\n",
" <td>918.232535</td>\n",
" <td>983.653976</td>\n",
" <td>1214.709294</td>\n",
" <td>2263.611114</td>\n",
" <td>3214.857818</td>\n",
" <td>4551.142150</td>\n",
" <td>6205.883850</td>\n",
" <td>7954.111645</td>\n",
" <td>8647.142313</td>\n",
" <td>11003.605080</td>\n",
" <td>12569.851770</td>\n",
" <td>47.622</td>\n",
" <td>49.618</td>\n",
" <td>51.520</td>\n",
" <td>53.298</td>\n",
" <td>56.024</td>\n",
" <td>59.319</td>\n",
" <td>61.484</td>\n",
" <td>63.622</td>\n",
" <td>62.745</td>\n",
" <td>52.556</td>\n",
" <td>46.634</td>\n",
" <td>50.728</td>\n",
" <td>442308.0</td>\n",
" <td>474639.0</td>\n",
" <td>512764.0</td>\n",
" <td>553541.0</td>\n",
" <td>619351.0</td>\n",
" <td>781472.0</td>\n",
" <td>970347.0</td>\n",
" <td>1151184.0</td>\n",
" <td>1342614.0</td>\n",
" <td>1536536.0</td>\n",
" <td>1630347</td>\n",
" <td>1639131</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Burkina Faso</th>\n",
" <td>Africa</td>\n",
" <td>Burkina Faso</td>\n",
" <td>543.255241</td>\n",
" <td>617.183465</td>\n",
" <td>722.512021</td>\n",
" <td>794.826560</td>\n",
" <td>854.735976</td>\n",
" <td>743.387037</td>\n",
" <td>807.198586</td>\n",
" <td>912.063142</td>\n",
" <td>931.752773</td>\n",
" <td>946.294962</td>\n",
" <td>1037.645221</td>\n",
" <td>1217.032994</td>\n",
" <td>31.975</td>\n",
" <td>34.906</td>\n",
" <td>37.814</td>\n",
" <td>40.697</td>\n",
" <td>43.591</td>\n",
" <td>46.137</td>\n",
" <td>48.122</td>\n",
" <td>49.557</td>\n",
" <td>50.260</td>\n",
" <td>50.324</td>\n",
" <td>50.650</td>\n",
" <td>52.295</td>\n",
" <td>4469979.0</td>\n",
" <td>4713416.0</td>\n",
" <td>4919632.0</td>\n",
" <td>5127935.0</td>\n",
" <td>5433886.0</td>\n",
" <td>5889574.0</td>\n",
" <td>6634596.0</td>\n",
" <td>7586551.0</td>\n",
" <td>8878303.0</td>\n",
" <td>10352843.0</td>\n",
" <td>12251209</td>\n",
" <td>14326203</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Burundi</th>\n",
" <td>Africa</td>\n",
" <td>Burundi</td>\n",
" <td>339.296459</td>\n",
" <td>379.564628</td>\n",
" <td>355.203227</td>\n",
" <td>412.977514</td>\n",
" <td>464.099504</td>\n",
" <td>556.103265</td>\n",
" <td>559.603231</td>\n",
" <td>621.818819</td>\n",
" <td>631.699878</td>\n",
" <td>463.115148</td>\n",
" <td>446.403513</td>\n",
" <td>430.070692</td>\n",
" <td>39.031</td>\n",
" <td>40.533</td>\n",
" <td>42.045</td>\n",
" <td>43.548</td>\n",
" <td>44.057</td>\n",
" <td>45.910</td>\n",
" <td>47.471</td>\n",
" <td>48.211</td>\n",
" <td>44.736</td>\n",
" <td>45.326</td>\n",
" <td>47.360</td>\n",
" <td>49.580</td>\n",
" <td>2445618.0</td>\n",
" <td>2667518.0</td>\n",
" <td>2961915.0</td>\n",
" <td>3330989.0</td>\n",
" <td>3529983.0</td>\n",
" <td>3834415.0</td>\n",
" <td>4580410.0</td>\n",
" <td>5126023.0</td>\n",
" <td>5809236.0</td>\n",
" <td>6121610.0</td>\n",
" <td>7021078</td>\n",
" <td>8390505</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Switzerland</th>\n",
" <td>Europe</td>\n",
" <td>Switzerland</td>\n",
" <td>14734.232750</td>\n",
" <td>17909.489730</td>\n",
" <td>20431.092700</td>\n",
" <td>22966.144320</td>\n",
" <td>27195.113040</td>\n",
" <td>26982.290520</td>\n",
" <td>28397.715120</td>\n",
" <td>30281.704590</td>\n",
" <td>31871.530300</td>\n",
" <td>32135.323010</td>\n",
" <td>34480.957710</td>\n",
" <td>37506.419070</td>\n",
" <td>69.620</td>\n",
" <td>70.560</td>\n",
" <td>71.320</td>\n",
" <td>72.770</td>\n",
" <td>73.780</td>\n",
" <td>75.390</td>\n",
" <td>76.210</td>\n",
" <td>77.410</td>\n",
" <td>78.030</td>\n",
" <td>79.370</td>\n",
" <td>80.620</td>\n",
" <td>81.701</td>\n",
" <td>4815000.0</td>\n",
" <td>5126000.0</td>\n",
" <td>5666000.0</td>\n",
" <td>6063000.0</td>\n",
" <td>6401400.0</td>\n",
" <td>6316424.0</td>\n",
" <td>6468126.0</td>\n",
" <td>6649942.0</td>\n",
" <td>6995447.0</td>\n",
" <td>7193761.0</td>\n",
" <td>7361757</td>\n",
" <td>7554661</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Turkey</th>\n",
" <td>Europe</td>\n",
" <td>Turkey</td>\n",
" <td>1969.100980</td>\n",
" <td>2218.754257</td>\n",
" <td>2322.869908</td>\n",
" <td>2826.356387</td>\n",
" <td>3450.696380</td>\n",
" <td>4269.122326</td>\n",
" <td>4241.356344</td>\n",
" <td>5089.043686</td>\n",
" <td>5678.348271</td>\n",
" <td>6601.429915</td>\n",
" <td>6508.085718</td>\n",
" <td>8458.276384</td>\n",
" <td>43.585</td>\n",
" <td>48.079</td>\n",
" <td>52.098</td>\n",
" <td>54.336</td>\n",
" <td>57.005</td>\n",
" <td>59.507</td>\n",
" <td>61.036</td>\n",
" <td>63.108</td>\n",
" <td>66.146</td>\n",
" <td>68.835</td>\n",
" <td>70.845</td>\n",
" <td>71.777</td>\n",
" <td>22235677.0</td>\n",
" <td>25670939.0</td>\n",
" <td>29788695.0</td>\n",
" <td>33411317.0</td>\n",
" <td>37492953.0</td>\n",
" <td>42404033.0</td>\n",
" <td>47328791.0</td>\n",
" <td>52881328.0</td>\n",
" <td>58179144.0</td>\n",
" <td>63047647.0</td>\n",
" <td>67308928</td>\n",
" <td>71158647</td>\n",
" </tr>\n",
" <tr>\n",
" <th>United Kingdom</th>\n",
" <td>Europe</td>\n",
" <td>United Kingdom</td>\n",
" <td>9979.508487</td>\n",
" <td>11283.177950</td>\n",
" <td>12477.177070</td>\n",
" <td>14142.850890</td>\n",
" <td>15895.116410</td>\n",
" <td>17428.748460</td>\n",
" <td>18232.424520</td>\n",
" <td>21664.787670</td>\n",
" <td>22705.092540</td>\n",
" <td>26074.531360</td>\n",
" <td>29478.999190</td>\n",
" <td>33203.261280</td>\n",
" <td>69.180</td>\n",
" <td>70.420</td>\n",
" <td>70.760</td>\n",
" <td>71.360</td>\n",
" <td>72.010</td>\n",
" <td>72.760</td>\n",
" <td>74.040</td>\n",
" <td>75.007</td>\n",
" <td>76.420</td>\n",
" <td>77.218</td>\n",
" <td>78.471</td>\n",
" <td>79.425</td>\n",
" <td>50430000.0</td>\n",
" <td>51430000.0</td>\n",
" <td>53292000.0</td>\n",
" <td>54959000.0</td>\n",
" <td>56079000.0</td>\n",
" <td>56179000.0</td>\n",
" <td>56339704.0</td>\n",
" <td>56981620.0</td>\n",
" <td>57866349.0</td>\n",
" <td>58808266.0</td>\n",
" <td>59912431</td>\n",
" <td>60776238</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Australia</th>\n",
" <td>Oceania</td>\n",
" <td>Australia</td>\n",
" <td>10039.595640</td>\n",
" <td>10949.649590</td>\n",
" <td>12217.226860</td>\n",
" <td>14526.124650</td>\n",
" <td>16788.629480</td>\n",
" <td>18334.197510</td>\n",
" <td>19477.009280</td>\n",
" <td>21888.889030</td>\n",
" <td>23424.766830</td>\n",
" <td>26997.936570</td>\n",
" <td>30687.754730</td>\n",
" <td>34435.367440</td>\n",
" <td>69.120</td>\n",
" <td>70.330</td>\n",
" <td>70.930</td>\n",
" <td>71.100</td>\n",
" <td>71.930</td>\n",
" <td>73.490</td>\n",
" <td>74.740</td>\n",
" <td>76.320</td>\n",
" <td>77.560</td>\n",
" <td>78.830</td>\n",
" <td>80.370</td>\n",
" <td>81.235</td>\n",
" <td>8691212.0</td>\n",
" <td>9712569.0</td>\n",
" <td>10794968.0</td>\n",
" <td>11872264.0</td>\n",
" <td>13177000.0</td>\n",
" <td>14074100.0</td>\n",
" <td>15184200.0</td>\n",
" <td>16257249.0</td>\n",
" <td>17481977.0</td>\n",
" <td>18565243.0</td>\n",
" <td>19546792</td>\n",
" <td>20434176</td>\n",
" </tr>\n",
" <tr>\n",
" <th>New Zealand</th>\n",
" <td>Oceania</td>\n",
" <td>New Zealand</td>\n",
" <td>10556.575660</td>\n",
" <td>12247.395320</td>\n",
" <td>13175.678000</td>\n",
" <td>14463.918930</td>\n",
" <td>16046.037280</td>\n",
" <td>16233.717700</td>\n",
" <td>17632.410400</td>\n",
" <td>19007.191290</td>\n",
" <td>18363.324940</td>\n",
" <td>21050.413770</td>\n",
" <td>23189.801350</td>\n",
" <td>25185.009110</td>\n",
" <td>69.390</td>\n",
" <td>70.260</td>\n",
" <td>71.240</td>\n",
" <td>71.520</td>\n",
" <td>71.890</td>\n",
" <td>72.220</td>\n",
" <td>73.840</td>\n",
" <td>74.320</td>\n",
" <td>76.330</td>\n",
" <td>77.550</td>\n",
" <td>79.110</td>\n",
" <td>80.204</td>\n",
" <td>1994794.0</td>\n",
" <td>2229407.0</td>\n",
" <td>2488550.0</td>\n",
" <td>2728150.0</td>\n",
" <td>2929100.0</td>\n",
" <td>3164900.0</td>\n",
" <td>3210650.0</td>\n",
" <td>3317166.0</td>\n",
" <td>3437674.0</td>\n",
" <td>3676187.0</td>\n",
" <td>3908037</td>\n",
" <td>4115771</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>141 rows × 38 columns</p>\n",
"</div>"
],
"text/plain": [
" continent country ... pop_2002 pop_2007\n",
"country ... \n",
"Angola Africa Angola ... 10866106 12420476\n",
"Benin Africa Benin ... 7026113 8078314\n",
"Botswana Africa Botswana ... 1630347 1639131\n",
"Burkina Faso Africa Burkina Faso ... 12251209 14326203\n",
"Burundi Africa Burundi ... 7021078 8390505\n",
"... ... ... ... ... ...\n",
"Switzerland Europe Switzerland ... 7361757 7554661\n",
"Turkey Europe Turkey ... 67308928 71158647\n",
"United Kingdom Europe United Kingdom ... 59912431 60776238\n",
"Australia Oceania Australia ... 19546792 20434176\n",
"New Zealand Oceania New Zealand ... 3908037 4115771\n",
"\n",
"[141 rows x 38 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 153
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ZrSxTpB4aCoD"
},
"source": [
"df = df.drop('Algeria')"
],
"execution_count": 155,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "SCT9NnB5bpAk"
},
"source": [
"# For Loops\n",
"\n",
"```python\n",
"for fruit in fruitList:\n",
" print(fruit)\n",
"```\n",
"\n",
"- First line starts with `for`\n",
"- After `for`, we invent a variable name to call the item that we'll refer to within the for loop\n",
"- First line ends with a `:`\n",
"- Next *lines* are all indented four spaces\n"
]
},
{
"cell_type": "code",
"metadata": {
"id": "DWjCAWuTatuo"
},
"source": [
"fruitList = ['apples', 'oranges', 'bananas', 'kiwis']"
],
"execution_count": 169,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "bsP7cgxK0oMc",
"outputId": "1c64fa35-20aa-441b-f8c0-59e62fd6bc26"
},
"source": [
"for fruit in fruitList: \n",
" print(fruit)"
],
"execution_count": 171,
"outputs": [
{
"output_type": "stream",
"text": [
"apples\n",
"oranges\n",
"bananas\n",
"kiwis\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "sp7ynSSz1q3C",
"outputId": "ca766b2c-f69f-48b7-d6d9-e0c2525b1fd1"
},
"source": [
"for fruit in fruitList: \n",
" print(\"I really like eating\", fruit)"
],
"execution_count": 172,
"outputs": [
{
"output_type": "stream",
"text": [
"I really like eating apples\n",
"I really like eating oranges\n",
"I really like eating bananas\n",
"I really like eating kiwis\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "KtKm0o6b2tbu",
"outputId": "b09d6450-fd0d-47be-90a2-c4fc2e4fc54c"
},
"source": [
"grantAwards = [35000, 30000, 5, 100000]\n",
"grantAwards.sort()\n",
"inflationRate = 0.05\n",
"for grant in grantAwards: \n",
" print(\"The original grant was: \", grant)\n",
" withInflation = grant + grant * inflationRate\n",
" print(\"Adjusted for inflation, that's: \", round(withInflation))"
],
"execution_count": 180,
"outputs": [
{
"output_type": "stream",
"text": [
"The original grant was: 5\n",
"Adjusted for inflation, that's: 5\n",
"The original grant was: 30000\n",
"Adjusted for inflation, that's: 31500\n",
"The original grant was: 35000\n",
"Adjusted for inflation, that's: 36750\n",
"The original grant was: 100000\n",
"Adjusted for inflation, that's: 105000\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "grGDvFqI3RLQ",
"outputId": "df83f284-c729-4a99-ef0d-f945e94eb656"
},
"source": [
"for number in range(10): \n",
" print(\"This is the song that never ends\")"
],
"execution_count": 185,
"outputs": [
{
"output_type": "stream",
"text": [
"This is the song that never ends\n",
"This is the song that never ends\n",
"This is the song that never ends\n",
"This is the song that never ends\n",
"This is the song that never ends\n",
"This is the song that never ends\n",
"This is the song that never ends\n",
"This is the song that never ends\n",
"This is the song that never ends\n",
"This is the song that never ends\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "L_RU7KEC4O5r",
"outputId": "21566eb5-9b98-4c02-8429-ab962ac10874"
},
"source": [
"!ls"
],
"execution_count": 186,
"outputs": [
{
"output_type": "stream",
"text": [
"data python-novice-gapminder-data.zip\tsample_data\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "c7wl3kA76o1I",
"outputId": "1cb1f048-1430-4caf-e39e-e47e48c4fd22"
},
"source": [
"!ls data/"
],
"execution_count": 187,
"outputs": [
{
"output_type": "stream",
"text": [
"gapminder_all.csv\t gapminder_gdp_americas.csv gapminder_gdp_europe.csv\n",
"gapminder_gdp_africa.csv gapminder_gdp_asia.csv gapminder_gdp_oceania.csv\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "KuPN03Pv6uA-"
},
"source": [
"import glob"
],
"execution_count": 188,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "LWqiPXvI6158",
"outputId": "907e4c9b-c791-43e2-fb65-546382568935"
},
"source": [
"glob.glob('data/*.csv')"
],
"execution_count": 189,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['data/gapminder_gdp_asia.csv',\n",
" 'data/gapminder_gdp_africa.csv',\n",
" 'data/gapminder_gdp_oceania.csv',\n",
" 'data/gapminder_gdp_americas.csv',\n",
" 'data/gapminder_all.csv',\n",
" 'data/gapminder_gdp_europe.csv']"
]
},
"metadata": {
"tags": []
},
"execution_count": 189
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "GUw-tgdi68K4",
"outputId": "f75e3bd0-b542-491a-af91-b01955b46904"
},
"source": [
"for filename in glob.glob('data/*.csv'): \n",
" print(\"I'm going to do something with the file: \", filename)"
],
"execution_count": 190,
"outputs": [
{
"output_type": "stream",
"text": [
"I'm going to do something with the file: data/gapminder_gdp_asia.csv\n",
"I'm going to do something with the file: data/gapminder_gdp_africa.csv\n",
"I'm going to do something with the file: data/gapminder_gdp_oceania.csv\n",
"I'm going to do something with the file: data/gapminder_gdp_americas.csv\n",
"I'm going to do something with the file: data/gapminder_all.csv\n",
"I'm going to do something with the file: data/gapminder_gdp_europe.csv\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "Sz-57Z3A7Gsl"
},
"source": [
"for row in df.iterrows():\n",
" index, data = row \n",
" print(\"GDP in 1957 minus 100: \", data['gdpPercap_1957'] - 100)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "zwjNM4Xc7QiP",
"outputId": "003b80eb-6558-47fe-bd6c-f530a806ceb2"
},
"source": [
"df['gdpPercap_1957'] - 100"
],
"execution_count": 196,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"country\n",
"Angola 3727.940465\n",
"Benin 859.601080\n",
"Botswana 818.232535\n",
"Burkina Faso 517.183465\n",
"Burundi 279.564628\n",
" ... \n",
"Switzerland 17809.489730\n",
"Turkey 2118.754257\n",
"United Kingdom 11183.177950\n",
"Australia 10849.649590\n",
"New Zealand 12147.395320\n",
"Name: gdpPercap_1957, Length: 141, dtype: float64"
]
},
"metadata": {
"tags": []
},
"execution_count": 196
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "7c5RDGzQ8CBi"
},
"source": [
""
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "QiRq6nYv8JXP"
},
"source": [
"## Accumulators"
]
},
{
"cell_type": "code",
"metadata": {
"id": "Y2lzFam_8KcR"
},
"source": [
"cookiePrices = [10.0, 15.0, 20.0, 21.99]\n",
"tax = 0.10 \n",
"cookiePricesWithTax = []\n",
"for cookiePrice in cookiePrices: \n",
" withTax = cookiePrice + cookiePrice * tax\n",
" cookiePricesWithTax.append(withTax)"
],
"execution_count": 203,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "tKGqERKo87dW",
"outputId": "b662e89b-47df-46cd-879f-e214a7c79665"
},
"source": [
"cookiePricesWithTax"
],
"execution_count": 204,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[11.0, 16.5, 22.0, 24.189]"
]
},
"metadata": {
"tags": []
},
"execution_count": 204
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "71MB5go4-gTi"
},
"source": [
"names = [\"Reeve, Jonathan\", \"Monster, Cookie\", \"Bird, Big\"]\n",
"namesReordered = []\n",
"for name in names: \n",
" nameParts = name.split(', ')\n",
" nameParts.reverse()\n",
" reorderedName = ' '.join(nameParts)\n",
" namesReordered.append(reorderedName)"
],
"execution_count": 211,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "sQQk6vA0AeNJ",
"outputId": "ca28f9e1-08ec-4457-ef4b-ae9fb25e1469"
},
"source": [
"namesReordered"
],
"execution_count": 212,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['Jonathan Reeve', 'Cookie Monster', 'Big Bird']"
]
},
"metadata": {
"tags": []
},
"execution_count": 212
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NBQ09VeDBHsG",
"outputId": "e29e543a-7b48-49de-f449-2bd51efba8e3"
},
"source": [
"df.columns"
],
"execution_count": 213,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"Index(['continent', 'country', 'gdpPercap_1952', 'gdpPercap_1957',\n",
" 'gdpPercap_1962', 'gdpPercap_1967', 'gdpPercap_1972', 'gdpPercap_1977',\n",
" 'gdpPercap_1982', 'gdpPercap_1987', 'gdpPercap_1992', 'gdpPercap_1997',\n",
" 'gdpPercap_2002', 'gdpPercap_2007', 'lifeExp_1952', 'lifeExp_1957',\n",
" 'lifeExp_1962', 'lifeExp_1967', 'lifeExp_1972', 'lifeExp_1977',\n",
" 'lifeExp_1982', 'lifeExp_1987', 'lifeExp_1992', 'lifeExp_1997',\n",
" 'lifeExp_2002', 'lifeExp_2007', 'pop_1952', 'pop_1957', 'pop_1962',\n",
" 'pop_1967', 'pop_1972', 'pop_1977', 'pop_1982', 'pop_1987', 'pop_1992',\n",
" 'pop_1997', 'pop_2002', 'pop_2007'],\n",
" dtype='object')"
]
},
"metadata": {
"tags": []
},
"execution_count": 213
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "z6Qm7-UPBVcb"
},
"source": [
"cleanColumns = []\n",
"for column in df.columns: \n",
" if column.startswith('gdpPercap_'): \n",
" onlyYear = column.split('_')[-1]\n",
" cleanColumns.append(onlyYear)"
],
"execution_count": 214,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "qZruAR7zB_s9",
"outputId": "218c3c4a-2f0f-4507-a445-13a0e1eafeb2"
},
"source": [
"cleanColumns"
],
"execution_count": 215,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"['1952',\n",
" '1957',\n",
" '1962',\n",
" '1967',\n",
" '1972',\n",
" '1977',\n",
" '1982',\n",
" '1987',\n",
" '1992',\n",
" '1997',\n",
" '2002',\n",
" '2007']"
]
},
"metadata": {
"tags": []
},
"execution_count": 215
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "OFl8YsouCA8E"
},
"source": [
""
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "34g7_MYXH2Ro"
},
"source": [
"# Data Cleaning"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "5O_Um8RCaawo",
"outputId": "0e7435be-b096-40c7-c441-17e2e68793fe"
},
"source": [
"gdps = ['235235.235', '235092.2342', '234098085.105', '23252085.58']\n",
"gdpsClean = []\n",
"for gdp in gdps: \n",
" gdpClean = float(gdp)\n",
" gdpsClean.append(gdpClean)\n",
"\n",
"sum(gdpsClean) / len(gdpsClean) "
],
"execution_count": 221,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"64455124.53854999"
]
},
"metadata": {
"tags": []
},
"execution_count": 221
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "HfhTtMdJH4f9"
},
"source": [
"gdps = ['@235235.235', '@@235092.2342', '!!!234098085.105', '$@%%23252085.58']\n",
"gdpsClean = []\n",
"for gdp in gdps: \n",
" cleanLetters = \"\"\n",
" for letter in gdp: \n",
" if letter.isnumeric() or letter == '.': \n",
" cleanLetters = cleanLetters + letter\n",
" gdpsClean.append(float(cleanLetters))"
],
"execution_count": 3,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "vBYztNFYIOju",
"outputId": "b0d01db3-0b67-41b3-e4ed-8d789debe0b7"
},
"source": [
"gdpsClean"
],
"execution_count": 4,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[235235.235, 235092.2342, 234098085.105, 23252085.58]"
]
},
"metadata": {
"tags": []
},
"execution_count": 4
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "mKvcl695Is7l"
},
"source": [
"## Conditionals\n",
"\n",
"```\n",
"if condition: \n",
" # thing to do if condition is met\n",
"else: \n",
" # thing to do if condition is not met\n",
"```"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "XtlVJu7eIt8K",
"outputId": "fcf0a3ec-397a-4de7-857d-2da6532451cc"
},
"source": [
"answer = input('What was the price of the meal? :')\n",
"answer = float(answer)\n",
"if answer > 15: \n",
" print(\"That's too expensive! Try to go to a cheaper restaurant next time.\")\n",
"else:\n",
" print(\"That's a good deal! You should eat there more often!\")"
],
"execution_count": 230,
"outputs": [
{
"output_type": "stream",
"text": [
"What was the price of the meal? :5\n",
"That's a good deal! You should eat there more often!\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "AG6ChMPJJJsT"
},
"source": [
"df = pd.read_csv('https://securegrants.neh.gov/Open/data/NEH_Grants2010s.csv')"
],
"execution_count": 21,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "cX0m-plXPn4w"
},
"source": [
"df['InstPostalCodeClean']"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "K0uFTj5vM1rQ"
},
"source": [
"for row in df.iterrows():\n",
" index, data = row\n",
" zipRaw = data['InstPostalCode']\n",
" zipClean = str(zipRaw)[:5]\n",
" df.loc[index]['InstPostCodeClean'] = zipClean"
],
"execution_count": 31,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "JOq0gGXuM46L"
},
"source": [
"def firstFive(number): \n",
" return str(number)[:5]\n",
"df['InstPostalCodeClean'] = df['InstPostalCode'].apply(firstFive)"
],
"execution_count": 39,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "lbNZ4pHMQiFl",
"outputId": "5dcbf422-2ae5-424d-f029-ff6b5377b48b"
},
"source": [
"df['InstPostalCodeClean']"
],
"execution_count": 40,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"0 99508\n",
"1 45202\n",
"2 14222\n",
"3 45202\n",
"4 02138\n",
" ... \n",
"7508 02215\n",
"7509 02141\n",
"7510 56321\n",
"7511 20002\n",
"7512 10562\n",
"Name: InstPostalCodeClean, Length: 7513, dtype: object"
]
},
"metadata": {
"tags": []
},
"execution_count": 40
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"id": "uvSRdXCPRu0P",
"outputId": "d51ebf6c-2868-44e8-ea80-d76dd6678773"
},
"source": [
"df"
],
"execution_count": 44,
"outputs": [
{
"output_type": "execute_result",
"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>AppNumber</th>\n",
" <th>ApplicantType</th>\n",
" <th>Institution</th>\n",
" <th>OrganizationType</th>\n",
" <th>InstCity</th>\n",
" <th>InstState</th>\n",
" <th>InstPostalCode</th>\n",
" <th>InstCountry</th>\n",
" <th>CongressionalDistrict</th>\n",
" <th>Latitude</th>\n",
" <th>Longitude</th>\n",
" <th>CouncilDate</th>\n",
" <th>YearAwarded</th>\n",
" <th>ProjectTitle</th>\n",
" <th>Program</th>\n",
" <th>Division</th>\n",
" <th>ApprovedOutright</th>\n",
" <th>ApprovedMatching</th>\n",
" <th>AwardOutright</th>\n",
" <th>AwardMatching</th>\n",
" <th>OriginalAmount</th>\n",
" <th>SupplementAmount</th>\n",
" <th>BeginGrant</th>\n",
" <th>EndGrant</th>\n",
" <th>ProjectDesc</th>\n",
" <th>ToSupport</th>\n",
" <th>PrimaryDiscipline</th>\n",
" <th>SupplementCount</th>\n",
" <th>Supplements</th>\n",
" <th>ParticipantCount</th>\n",
" <th>Participants</th>\n",
" <th>DisciplineCount</th>\n",
" <th>Disciplines</th>\n",
" <th>InstPostalCodeClean</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>CZ-50209-10</td>\n",
" <td>1</td>\n",
" <td>University of Alaska, Anchorage</td>\n",
" <td>Two-Year College</td>\n",
" <td>Anchorage</td>\n",
" <td>AK</td>\n",
" <td>99508-4614</td>\n",
" <td>USA</td>\n",
" <td>1</td>\n",
" <td>61.189840</td>\n",
" <td>-149.818760</td>\n",
" <td>2008-07-01</td>\n",
" <td>2008</td>\n",
" <td>Forty-Ninth State Fellows Program</td>\n",
" <td>Special Initiatives</td>\n",
" <td>Challenge Programs</td>\n",
" <td>0.0</td>\n",
" <td>500000.0</td>\n",
" <td>0.0</td>\n",
" <td>12291.00</td>\n",
" <td>12291.00</td>\n",
" <td>0.0</td>\n",
" <td>2007-09-01</td>\n",
" <td>2013-04-30</td>\n",
" <td>Founded in 2005, The Forty-Ninth State Fellows...</td>\n",
" <td>Endowment for a full-time coordinator, summer ...</td>\n",
" <td>U.S. History</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>1</td>\n",
" <td>U.S. History</td>\n",
" <td>99508</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>CZ-50212-10</td>\n",
" <td>1</td>\n",
" <td>National Underground Railroad Freedom Center</td>\n",
" <td>National Organization</td>\n",
" <td>Cincinnati</td>\n",
" <td>OH</td>\n",
" <td>45202-3413</td>\n",
" <td>USA</td>\n",
" <td>1</td>\n",
" <td>39.097310</td>\n",
" <td>-84.512840</td>\n",
" <td>2008-07-01</td>\n",
" <td>2008</td>\n",
" <td>Endowment for National Underground Railroad Fr...</td>\n",
" <td>Special Initiatives</td>\n",
" <td>Challenge Programs</td>\n",
" <td>0.0</td>\n",
" <td>650000.0</td>\n",
" <td>0.0</td>\n",
" <td>650000.00</td>\n",
" <td>650000.00</td>\n",
" <td>0.0</td>\n",
" <td>2007-09-01</td>\n",
" <td>2014-07-31</td>\n",
" <td>The National Underground Railroad Freedom Cent...</td>\n",
" <td>Endowment for core programs: exhibits, educati...</td>\n",
" <td>Interdisciplinary Studies, General</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>3</td>\n",
" <td>Donald Murphy [Project Director]; Kim Robinson...</td>\n",
" <td>1</td>\n",
" <td>Interdisciplinary Studies, General</td>\n",
" <td>45202</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>CH-50611-10</td>\n",
" <td>1</td>\n",
" <td>SUNY Research Foundation, Buffalo State College</td>\n",
" <td>Center For Advanced Study/Research Institute</td>\n",
" <td>Buffalo</td>\n",
" <td>NY</td>\n",
" <td>14222-1004</td>\n",
" <td>USA</td>\n",
" <td>26</td>\n",
" <td>42.933220</td>\n",
" <td>-78.877070</td>\n",
" <td>2008-11-01</td>\n",
" <td>2008</td>\n",
" <td>Art Conservation Facilities Improvement and Co...</td>\n",
" <td>Challenge Grants</td>\n",
" <td>Challenge Programs</td>\n",
" <td>0.0</td>\n",
" <td>200000.0</td>\n",
" <td>0.0</td>\n",
" <td>200000.00</td>\n",
" <td>200000.00</td>\n",
" <td>0.0</td>\n",
" <td>2007-12-01</td>\n",
" <td>2013-07-31</td>\n",
" <td>The Buffalo State College Art Conservation Dep...</td>\n",
" <td>Expansion of conservation facilities and endow...</td>\n",
" <td>Archival Management and Conservation</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>3</td>\n",
" <td>Elizabeth Peña [Project Director]; James Hamm ...</td>\n",
" <td>1</td>\n",
" <td>Archival Management and Conservation</td>\n",
" <td>14222</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>CH-50652-10</td>\n",
" <td>1</td>\n",
" <td>National Underground Railroad Freedom Center</td>\n",
" <td>National Organization</td>\n",
" <td>Cincinnati</td>\n",
" <td>OH</td>\n",
" <td>45202-3413</td>\n",
" <td>USA</td>\n",
" <td>1</td>\n",
" <td>39.097310</td>\n",
" <td>-84.512840</td>\n",
" <td>2008-11-01</td>\n",
" <td>2008</td>\n",
" <td>The National Underground Railroad Freedom Cent...</td>\n",
" <td>Challenge Grants</td>\n",
" <td>Challenge Programs</td>\n",
" <td>0.0</td>\n",
" <td>600000.0</td>\n",
" <td>0.0</td>\n",
" <td>600000.00</td>\n",
" <td>600000.00</td>\n",
" <td>0.0</td>\n",
" <td>2007-12-01</td>\n",
" <td>2014-12-31</td>\n",
" <td>The National Underground Railroad Freedom Cent...</td>\n",
" <td>To Support: Endowment for education programs f...</td>\n",
" <td>Interdisciplinary Studies, General</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>3</td>\n",
" <td>Donald Murphy [Project Director]; Kim Robinson...</td>\n",
" <td>1</td>\n",
" <td>Interdisciplinary Studies, General</td>\n",
" <td>45202</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>GI-50097-10</td>\n",
" <td>1</td>\n",
" <td>Harvard University</td>\n",
" <td>University</td>\n",
" <td>Cambridge</td>\n",
" <td>MA</td>\n",
" <td>02138-3800</td>\n",
" <td>USA</td>\n",
" <td>5</td>\n",
" <td>42.373760</td>\n",
" <td>-71.116700</td>\n",
" <td>2009-02-01</td>\n",
" <td>2009</td>\n",
" <td>Prints and the Pursuit of Knowledge in Early M...</td>\n",
" <td>America's Historical and Cultural Organization...</td>\n",
" <td>Public Programs</td>\n",
" <td>0.0</td>\n",
" <td>350000.0</td>\n",
" <td>0.0</td>\n",
" <td>349999.79</td>\n",
" <td>349999.79</td>\n",
" <td>0.0</td>\n",
" <td>2010-01-01</td>\n",
" <td>2012-12-31</td>\n",
" <td>The Harvard Art Museum will organize, present,...</td>\n",
" <td>Implementation of a traveling exhibition, a co...</td>\n",
" <td>Arts, General</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>1</td>\n",
" <td>Susan Dackerman [Project Director]</td>\n",
" <td>1</td>\n",
" <td>Arts, General</td>\n",
" <td>02138</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7508</th>\n",
" <td>RJ-269493-19</td>\n",
" <td>1</td>\n",
" <td>Archaeological Institute of America</td>\n",
" <td>Anthropology/Archaeology Museum</td>\n",
" <td>Boston</td>\n",
" <td>MA</td>\n",
" <td>02215-2006</td>\n",
" <td>USA</td>\n",
" <td>7</td>\n",
" <td>42.349360</td>\n",
" <td>-71.096010</td>\n",
" <td>2019-09-01</td>\n",
" <td>2019</td>\n",
" <td>NEH Archaeology Grants through the Archaeologi...</td>\n",
" <td>Cooperative Agreements and Special Projects (R...</td>\n",
" <td>Research Programs</td>\n",
" <td>564418.0</td>\n",
" <td>0.0</td>\n",
" <td>564418.0</td>\n",
" <td>0.00</td>\n",
" <td>564418.00</td>\n",
" <td>0.0</td>\n",
" <td>2019-09-01</td>\n",
" <td>2021-09-30</td>\n",
" <td>The Archaeological Institute of America (AIA) ...</td>\n",
" <td>A small grants program for humanistic archaeol...</td>\n",
" <td>Unknown</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>3</td>\n",
" <td>Laetitia La Follette [Project Director]; Jodi ...</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>02215</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7509</th>\n",
" <td>AH-269621-19</td>\n",
" <td>1</td>\n",
" <td>iCivics, Inc.</td>\n",
" <td>Publishing</td>\n",
" <td>Cambridge</td>\n",
" <td>MA</td>\n",
" <td>02141-1057</td>\n",
" <td>USA</td>\n",
" <td>7</td>\n",
" <td>42.373020</td>\n",
" <td>-71.094070</td>\n",
" <td>2019-09-01</td>\n",
" <td>2019</td>\n",
" <td>Educating for American Democracy: A Roadmap f...</td>\n",
" <td>Cooperative Agreements and Special Projects (E...</td>\n",
" <td>Education Programs</td>\n",
" <td>1100000.0</td>\n",
" <td>0.0</td>\n",
" <td>1100000.0</td>\n",
" <td>0.00</td>\n",
" <td>1100000.00</td>\n",
" <td>0.0</td>\n",
" <td>2019-10-01</td>\n",
" <td>2021-06-30</td>\n",
" <td>The civics field has long lacked a structure f...</td>\n",
" <td>No to support statement</td>\n",
" <td>American Studies</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>7</td>\n",
" <td>Kelly Leahy Whitney [Project Director]; Daniel...</td>\n",
" <td>3</td>\n",
" <td>American Studies; Social Sciences, General; U....</td>\n",
" <td>02141</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7510</th>\n",
" <td>GJ-269662-19</td>\n",
" <td>2</td>\n",
" <td>St. John's University, Collegeville</td>\n",
" <td>Unknown</td>\n",
" <td>Collegeville</td>\n",
" <td>MN</td>\n",
" <td>56321-2000</td>\n",
" <td>USA</td>\n",
" <td>6</td>\n",
" <td>Unknown</td>\n",
" <td>unknown</td>\n",
" <td>1900-01-01</td>\n",
" <td>2019</td>\n",
" <td>2019 Jefferson Lecture: \"Cultural Heritage Pre...</td>\n",
" <td>The Jefferson Lecture</td>\n",
" <td>Agency-wide Projects</td>\n",
" <td>10000.0</td>\n",
" <td>0.0</td>\n",
" <td>10000.0</td>\n",
" <td>0.00</td>\n",
" <td>10000.00</td>\n",
" <td>0.0</td>\n",
" <td>2019-09-01</td>\n",
" <td>2019-10-31</td>\n",
" <td>No description</td>\n",
" <td>No to support statement</td>\n",
" <td>Unknown</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>1</td>\n",
" <td>Columba Stewart [Project Director]</td>\n",
" <td>4</td>\n",
" <td>Ancient Languages; Archival Management and Con...</td>\n",
" <td>56321</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7511</th>\n",
" <td>GA-269810-19</td>\n",
" <td>1</td>\n",
" <td>Mosaic Theater Company of DC</td>\n",
" <td>Arts-Related Organization</td>\n",
" <td>Washington</td>\n",
" <td>DC</td>\n",
" <td>20002-4446</td>\n",
" <td>USA</td>\n",
" <td>1</td>\n",
" <td>38.900140</td>\n",
" <td>-76.987190</td>\n",
" <td>1900-01-01</td>\n",
" <td>2019</td>\n",
" <td>Emmett Till Scholar Tour - Engagement Manager ...</td>\n",
" <td>Cooperative Agreements and Special Projects (P...</td>\n",
" <td>Public Programs</td>\n",
" <td>30000.0</td>\n",
" <td>0.0</td>\n",
" <td>30000.0</td>\n",
" <td>0.00</td>\n",
" <td>30000.00</td>\n",
" <td>0.0</td>\n",
" <td>2019-07-01</td>\n",
" <td>2020-06-30</td>\n",
" <td>No description</td>\n",
" <td>No to support statement</td>\n",
" <td>Unknown</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>2</td>\n",
" <td>Ari Roth [Project Director]; Victoria Baatin [...</td>\n",
" <td>1</td>\n",
" <td>African American History</td>\n",
" <td>20002</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7512</th>\n",
" <td>PB-270809-19</td>\n",
" <td>1</td>\n",
" <td>Sing Sing Prison Museum</td>\n",
" <td>Museum</td>\n",
" <td>Ossining</td>\n",
" <td>NY</td>\n",
" <td>10562-4655</td>\n",
" <td>USA</td>\n",
" <td>17</td>\n",
" <td>41.160890</td>\n",
" <td>-73.864040</td>\n",
" <td>1900-01-01</td>\n",
" <td>2019</td>\n",
" <td>Sing Sing Prison Museum Collections Survey</td>\n",
" <td>Cooperative Agreements and Special Projects (P&amp;A)</td>\n",
" <td>Preservation and Access</td>\n",
" <td>30000.0</td>\n",
" <td>0.0</td>\n",
" <td>30000.0</td>\n",
" <td>0.00</td>\n",
" <td>30000.00</td>\n",
" <td>0.0</td>\n",
" <td>2019-11-01</td>\n",
" <td>2020-08-31</td>\n",
" <td>No description</td>\n",
" <td>The Sing Sing Prison Museum (SSPM) Collections...</td>\n",
" <td>Unknown</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>1</td>\n",
" <td>Brent Glass [Project Director]</td>\n",
" <td>4</td>\n",
" <td>Archival Management and Conservation; Politica...</td>\n",
" <td>10562</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>7513 rows × 34 columns</p>\n",
"</div>"
],
"text/plain": [
" AppNumber ... InstPostalCodeClean\n",
"0 CZ-50209-10 ... 99508\n",
"1 CZ-50212-10 ... 45202\n",
"2 CH-50611-10 ... 14222\n",
"3 CH-50652-10 ... 45202\n",
"4 GI-50097-10 ... 02138\n",
"... ... ... ...\n",
"7508 RJ-269493-19 ... 02215\n",
"7509 AH-269621-19 ... 02141\n",
"7510 GJ-269662-19 ... 56321\n",
"7511 GA-269810-19 ... 20002\n",
"7512 PB-270809-19 ... 10562\n",
"\n",
"[7513 rows x 34 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 44
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 423
},
"id": "6GQ0AOm_Nyoz",
"outputId": "56cf58e3-4f40-4aee-d24c-9a0314e82797"
},
"source": [
"df.groupby('InstState').sum()['OriginalAmount'].sort_values(ascending=False).plot(kind='bar', figsize=(10,6))"
],
"execution_count": 50,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7ff82e466610>"
]
},
"metadata": {
"tags": []
},
"execution_count": 50
},
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAlMAAAGFCAYAAADZznZHAAAABHNCSVQICAgIfAhkiAAAAAlwSF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fru59MZ34wGBy2vZ+v1rGxv5prVJkxpqtUlJGn6ZnqnNY3pusxJDzCztb2ZawxTkiRJFdaY7QpIkiStygxTkiRJFQxTkmZNlB+EXZHh9omI7VrPnxYR34uIyyLi2ii/20ZE7BYRf9JjfL3KSdIws/ZzMpJUYR/gK5QfUoZy/5uXZ+blETEPeHTz+m7AbyhXFo3Tt5wkLccO6JJmTUT8JssPKu9GuVvzLyi3V7gYeFVmZkQcA+xFuTz7HMp9xb7Cst9DfAnlDsyPzszbWuNeCFxAuXv0Usqd9h9MuYvz2sDtlBsRrjek3A+AjwMLmtG9LTO/vRJmgaTVgC1TkuaKHSn3CruVcqn1LhFxLeXncx7TBKsHZ+adzY8qfyUzPw8QER8ErouIr1N+3uJfM/OmiPg45TfEPtCUewjwtGZcBwLvysx3DCn3GeCDmfmtiFgAnA089v6bFZJWJYYpSXPF9zNzCUDz6/ALKS1GvwM+GRFfobRILSczj4qIfwP+lPKbaftTTt11bQF8NiI2o7RO3TiiLs8Gtiu/kgHAhhGxwUz9xJOk1Ysd0CXNFb9vPf4j5Zfj7wF2Aj5P+XmKr40aODN/nJknArsDT4iIhw4p9hHgo5m5PeUHVtcdMbo1KC1YT2z+NjdISRrFMCVpzoqIDYCNMvNM4O3AE5q3fk35FftBuRfEsmakbShh7M5uOWAjYPA7ga9tvd4tdw6l79Rg/E+s/jCSVluGKUlz2YOAr0TEFcC3KL9eD3Aq8M6IuDQiHgm8mtJn6jLgZOCVmflH4MvAi5pbJuxK6eT+uYi4mNLZfaBb7i3Aooi4IiKuAd648j+qpFWVV/NJkiRVsGVKkiSpgmFKkiSpgmFKkiSpgmFKkiSpgmFKkiSpgmFKkiSpgmFKkiSpgmFKkiSpwv8HaNILBH/pKiMAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"tags": [],
"needs_background": "light"
}
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "NAhSPsB7OFTs"
},
"source": [
""
],
"execution_count": null,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment