In [1]:
%matplotlib inline
import pandas as pd

In [2]:
from IPython.core.display import HTML
css = open('style-table.css').read() + open('style-notebook.css').read()
HTML('<style>{}</style>'.format(css))


Out[2]:

In [3]:
sales1 = pd.read_csv('sales1.csv')
sales1


Out[3]:
Book title Number sold Sales price Royalty paid
0 The Bricklayer’s Bible 8 2.99 0.55
1 Swimrand 2 1.99 0.35
2 Pining For The Fisheries of Yore 28 2.99 0.55
3 The Duck Goes Here 34 2.99 0.55
4 The Tower Commission Report 4 11.50 4.25

In [4]:
sales2 = pd.read_csv('sales2.csv')
sales2.fillna('')


Out[4]:
Title Units sold List price Royalty
0
1 Sales report for Q4
2 E-Book Reader US Store
3 Pining for the Fisheries of Yore 80 3.5 14.98
4 Swimrand 1 2.99 0.14
5 The Bricklayer's Bible 17 3.5 5.15
6 The Duck Goes Here 34 2.99 5.78
7 The Tower Commission Report 4 9.5 6.2
8 US royalties (USD) 32.25
9
10
11 Sales report for Q4
12 E-Book Reader UK Store
13 Pining for the Fisheries of Yore 47 2.99 11.98
14 The Bricklayer's Bible 17 2.99 3.5
15 The Tower Commission Report 4 6.5 4.8
16 UK royalties (GBP) 20.28
17
18
19 Sales report for Q4
20 E-Book Reader France Store
21 Swimrand 8 1.99 0.88
22 The Duck Goes Here 12 1.99 1.5
23 France royalties (EUR) 2.38

Challenge: first combine these sales together into a single dataframe, then compute how much money consumers spent on each book in each currency.


In [ ]:


In [ ]: