{ "metadata": { "name": "", "signature": "sha256:dd0e2c64a0ef1484608ae7210577940287eee2ef18545187a90f8746ed705f0e" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from IPython.display import HTML\n", "\n", "%matplotlib inline" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "df = pd.read_csv('../data/gdp_wordbank.csv', \n", " index_col=[1,2], na_values=['..'])\n", "df.sortlevel(inplace=True)\n", "\n", "HTML(df.loc[( slice('NY.GDP.PCAP.KD', 'NY.GDP.PCAP.KN'),\n", " slice('Andorra','Angola')), :]\n", " .ix[:,:5]\n", " .to_html())" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
\n", " | \n", " | \ufeffSeries Name | \n", "Country Code | \n", "2004 [YR2004] | \n", "2005 [YR2005] | \n", "2006 [YR2006] | \n", "
---|---|---|---|---|---|---|
Series Code | \n", "Country Name | \n", "\n", " | \n", " | \n", " | \n", " | \n", " |
NY.GDP.PCAP.KD | \n", "Andorra | \n", "GDP per capita (constant 2005 US$) | \n", "ADO | \n", "30329.589913 | \n", "31268.966745 | \n", "33125.386792 | \n", "
Angola | \n", "GDP per capita (constant 2005 US$) | \n", "AGO | \n", "1494.296347 | \n", "1706.543616 | \n", "1990.839161 | \n", "|
NY.GDP.PCAP.KD.ZG | \n", "Andorra | \n", "GDP per capita growth (annual %) | \n", "ADO | \n", "1.882501 | \n", "3.097229 | \n", "5.936941 | \n", "
Angola | \n", "GDP per capita growth (annual %) | \n", "AGO | \n", "7.023286 | \n", "14.203827 | \n", "16.659143 | \n", "|
NY.GDP.PCAP.KN | \n", "Andorra | \n", "GDP per capita (constant LCU) | \n", "ADO | \n", "14338.168009 | \n", "14782.253896 | \n", "15659.867560 | \n", "
Angola | \n", "GDP per capita (constant LCU) | \n", "AGO | \n", "39736.007970 | \n", "45380.041829 | \n", "52939.967995 | \n", "