In [2]:
print "Hello Roxanne"
def sum2(a,b):
  return a+b


Hello Roxanne

In [4]:
sum2(1,2)
def funtimes(a,b):
    return a**2 + 3*b - 4
funtimes(3,5)


Out[4]:
20

In [5]:
!wget http://www.dhs.gov/sites/default/files/publications/immigration-statistics/yearbook/2013/RFA/table13.xls


--2014-11-06 21:48:51--  http://www.dhs.gov/sites/default/files/publications/immigration-statistics/yearbook/2013/RFA/table13.xls
Resolving www.dhs.gov (www.dhs.gov)... 23.192.52.56, 2600:141b:4:293::1955, 2600:141b:4:286::1955
Connecting to www.dhs.gov (www.dhs.gov)|23.192.52.56|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25600 (25K) [application/vnd.ms-excel]
Saving to: ‘table13.xls’

100%[======================================>] 25,600      --.-K/s   in 0.02s   

2014-11-06 21:48:52 (1.34 MB/s) - ‘table13.xls’ saved [25600/25600]


In [6]:
!ls


aapl_ohlc.csv	       libs			polyglot_data	 scikit_learn_data   size_matters.png  three_clusters.mat
countries_visited.csv  nltk_data		power		 scripts	     submission.csv    words_embeddings_32.pkl
Download.pdf	       notebooks		predictions.csv  singular_skew2.pdf  table13.xls       Z.mat
FreebaseRecords.pkl    oversampling_effect.pdf	sample.vec	 singular_skew.pdf   texas.html

In [7]:
import pandas as pd

In [20]:
refugees = pd.read_excel("table13.xls", header=2, skip_footer=2)

In [21]:
refugees


Out[21]:
Year Number
0 1980 207116
1 1981 159252
2 1982 98096
3 1983 61218
4 1984 70393
5 1985 67704
6 1986 62146
7 1987 64528
8 1988 76483
9 1989 107070
10 1990 122066
11 1991 113389
12 1992 115548
13 1993 114181
14 1994 111680
15 1995 98973
16 1996 75421
17 1997 69653
18 1998 76712
19 1999 85285
20 2000 72143
21 2001 68925
22 2002 26788
23 2003 28286
24 2004 52840
25 2005 53738
26 2006 41094
27 2007 48218
28 2008 60107
29 2009 74602
30 2010 73293
31 2011 56384
32 2012 58179
33 2013 69909

In [22]:
import matplotlib.pyplot as plt

In [23]:
%matplotlib inline

In [25]:
refugees.plot()


Out[25]:
<matplotlib.axes.AxesSubplot at 0x7f3a7213aa90>
/usr/lib/pymodules/python2.7/matplotlib/font_manager.py:1236: UserWarning: findfont: Font family ['monospace'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))