In [9]:
import pandas as pd
In [10]:
df = pd.read_excel("richpeople.xlsx")
print(df)
year name rank citizenship \
0 2001 A Jerrold Perenchio 151 United States
1 2014 A. Jerrold Perenchio 663 United States
2 2001 Abdul Al Rahman Al Jeraisy 336 Saudi Arabia
3 2001 Abdul Aziz Al Ghurair 251 United Arab Emirates
4 1996 Abdul Aziz Al-Sulaiman 404 Saudi Arabia
5 2014 Abdulla Al Futtaim 687 United Arab Emirates
6 2014 Abdulla bin Ahmad Al Ghurair 305 United Arab Emirates
7 2001 Abdullah Al Rajhi 222 Saudi Arabia
8 2014 Abdullah Al Rajhi 731 Saudi Arabia
9 2014 Abdulsamad Rabiu 1372 Nigeria
10 1996 Abigail Johnson 145 United States
11 2001 Abigail Johnson 30 United States
12 2014 Abigail Johnson 50 United States
13 1996 Abilio dos Santos Diniz 322 Brazil
14 2001 Abilio dos Santos Diniz 312 Brazil
15 2014 Abilio dos Santos Diniz 609 Brazil
16 2001 Achille Maramotti 222 Italy
17 2014 Achmad Hamami 1092 Indonesia
18 2014 Adi Godrej 446 India
19 1996 Adolf Merckle 388 Germany
20 2001 Adolf Merckle 222 Germany
21 1996 Adrian and John Swire 162 Hong Kong
22 2001 Adrian Swire 222 United Kingdom
23 2014 Aerin Lauder Zinterhofer 1465 United States
24 1996 Ahmed Ali Kanoo 383 Bahrain
25 2014 Ahmet Calik 1465 Turkey
26 2014 Ahmet Nazif Zorlu 1372 Turkey
27 2014 Ahsen Ozokur 1143 Turkey
28 2014 Airat Shaimiev 1465 Russia
29 2014 Ajay Kalsi 973 India
... ... ... ... ...
2584 2014 Yuri Milner 988 Russia
2585 2014 Yuriy Kosiuk 1154 Ukraine
2586 2014 Yusaku Maezawa 1356 Japan
2587 2014 Yusuf Hamied 1465 India
2588 2014 Yvonne Bauer 446 Germany
2589 2014 Zadik Bino 1540 Israel
2590 2014 Zarakh Iliev 430 Russia
2591 2014 Zdenek Bakala 1565 Czech Republic
2592 2014 Zelimkhan Mutsoev 1284 Russia
2593 2014 Zhang Changhong 1203 China
2594 2014 Zhang Guiping 1465 China
2595 2014 Zhang Hongwei 1046 China
2596 2014 Zhang Jindong 408 China
2597 2014 Zhang Li 828 China
2598 2014 Zhang Shiping 430 China
2599 2014 Zhang Xin 408 China
2600 2014 Zhang Zhidong 305 China
2601 2014 Zhang Zhirong 988 Hong Kong
2602 2014 Zhang Zhongneng 1372 China
2603 2014 Zhong Sheng Jian 1372 Singapore
2604 2014 Zhou Chengjian 1092 China
2605 2014 Zhou Hongyi 828 China
2606 2014 Zhu Gongshan 828 China
2607 2014 Zhu Wenchen 1565 China
2608 2014 Zhu Xingliang 988 China
2609 2014 Zhu Yicai 1154 China
2610 2014 Ziyad Manasir 609 Russia
2611 2014 Ziyaudin Magomedov 1372 Russia
2612 2014 Zong Qinghou 94 China
2613 2014 Zygmunt Solorz-Zak 446 Poland
countrycode networthusbillion selfmade typeofwealth \
0 USA 3.0 self-made executive
1 USA 2.6 self-made executive
2 SAU 1.5 self-made founder non-finance
3 ARE 1.9 inherited inherited
4 SAU 1.0 self-made self-made finance
5 ARE 2.5 inherited inherited
6 ARE 4.8 inherited inherited
7 SAU 2.1 self-made self-made finance
8 SAU 2.4 self-made self-made finance
9 NGA 1.2 self-made founder non-finance
10 USA 2.5 inherited inherited
11 USA 9.1 inherited inherited
12 USA 17.3 inherited inherited
13 BRA 1.2 inherited inherited
14 BRA 1.6 inherited inherited
15 BRA 2.8 inherited inherited
16 ITA 2.1 self-made founder non-finance
17 IDN 1.6 self-made founder non-finance
18 IND 3.5 inherited inherited
19 DEU 1.0 inherited inherited
20 DEU 2.1 inherited inherited
21 HKG 2.2 inherited inherited
22 GBR 2.1 inherited inherited
23 USA 1.1 inherited inherited
24 BHR 1.0 inherited inherited
25 TUR 1.1 self-made privatized and resources
26 TUR 1.2 self-made self-made finance
27 TUR 1.6 inherited inherited
28 RUS 1.1 self-made privatized and resources
29 IND 1.9 self-made privatized and resources
... ... ... ... ...
2584 RUS 1.8 self-made founder non-finance
2585 UKR 1.5 self-made founder non-finance
2586 JPN 1.3 self-made founder non-finance
2587 IND 1.1 inherited inherited
2588 DEU 3.5 inherited inherited
2589 ISR 1.1 self-made self-made finance
2590 RUS 3.6 self-made self-made finance
2591 CZE 1.0 self-made privatized and resources
2592 RUS 1.3 self-made executive
2593 CHN 1.5 self-made self-made finance
2594 CHN 1.1 self-made self-made finance
2595 CHN 1.7 self-made self-made finance
2596 CHN 3.7 self-made founder non-finance
2597 CHN 2.1 self-made self-made finance
2598 CHN 3.6 self-made privatized and resources
2599 CHN 3.7 self-made self-made finance
2600 CHN 4.8 self-made founder non-finance
2601 HKG 1.8 self-made executive
2602 CHN 1.2 self-made privatized and resources
2603 SGP 1.2 self-made self-made finance
2604 CHN 1.6 self-made founder non-finance
2605 CHN 2.1 self-made founder non-finance
2606 CHN 2.1 self-made privatized and resources
2607 CHN 1.0 self-made executive
2608 CHN 1.8 self-made executive
2609 CHN 1.5 self-made self-made finance
2610 RUS 2.8 self-made privatized and resources
2611 RUS 1.2 self-made privatized and resources
2612 CHN 11.6 self-made founder non-finance
2613 POL 3.5 self-made founder non-finance
gender age ... relationshiptocompany foundingdate \
0 male 70.0 ... former chairman and CEO 1955.0
1 male 83.0 ... former chairman and CEO 1955.0
2 male NaN ... founder 1956.0
3 male 47.0 ... relation 1960.0
4 male 0.0 ... founder 1968.0
5 male NaN ... relation 1930.0
6 male NaN ... relation 1960.0
7 male NaN ... founder 1957.0
8 male NaN ... founder 1957.0
9 male 54.0 ... founder 1988.0
10 female 34.0 ... relation 1946.0
11 female 39.0 ... relation 1946.0
12 female 52.0 ... relation 1946.0
13 male 59.0 ... relation 1948.0
14 male 64.0 ... relation 1948.0
15 male 77.0 ... relation 1948.0
16 male 74.0 ... founder 1951.0
17 male 83.0 ... founder 1980.0
18 male 71.0 ... relation 1897.0
19 male 61.0 ... relation 1881.0
20 male 66.0 ... relation 1881.0
21 male 0.0 ... relation 1816.0
22 male 70.0 ... relation 1816.0
23 female 44.0 ... relation 1946.0
24 male 0.0 ... relation 1890.0
25 male 56.0 ... relation 1981.0
26 male 69.0 ... founder 1953.0
27 female 63.0 ... relation 1944.0
28 male 51.0 ... owner 1995.0
29 male 53.0 ... founder 1998.0
... ... ... ... ... ...
2584 male 52.0 ... founder 1999.0
2585 male 45.0 ... founder 1998.0
2586 male 38.0 ... founder 2004.0
2587 male 77.0 ... relation 1935.0
2588 female 36.0 ... relation 1875.0
2589 male 70.0 ... owner 1922.0
2590 male 47.0 ... founder NaN
2591 male 53.0 ... founder 1994.0
2592 male 54.0 ... owner 2004.0
2593 male 55.0 ... chairman 2000.0
2594 male 62.0 ... chairman 1990.0
2595 male 59.0 ... chairman 2007.0
2596 male 50.0 ... founder/president 1990.0
2597 male 61.0 ... chairman 1994.0
2598 male 67.0 ... founder 1994.0
2599 female 48.0 ... founder 1995.0
2600 male 42.0 ... founder 1998.0
2601 male 45.0 ... CEO 2005.0
2602 male 50.0 ... owner 1993.0
2603 male 56.0 ... founder 1993.0
2604 male 48.0 ... founder 1986.0
2605 male 43.0 ... founder 2005.0
2606 male 56.0 ... founder 2008.0
2607 male 48.0 ... chairman 1999.0
2608 male 54.0 ... investor 1994.0
2609 male 49.0 ... founder 1993.0
2610 male 48.0 ... founder 1992.0
2611 male 45.0 ... founder 2004.0
2612 male 68.0 ... founder 1987.0
2613 male 57.0 ... founder 1992.0
gdpcurrentus sourceofwealth \
0 1.062180e+13 NaN
1 NaN television, Univision
2 1.830120e+11 NaN
3 1.030000e+11 NaN
4 1.577430e+11 NaN
5 NaN auto dealers, investments
6 NaN diversified
7 1.830120e+11 NaN
8 NaN banking
9 NaN sugar, flour, cement
10 8.100200e+12 NaN
11 1.062180e+13 NaN
12 NaN money management
13 8.540000e+11 NaN
14 5.600000e+11 NaN
15 NaN retail
16 1.160000e+12 NaN
17 NaN heavy equipment
18 NaN consumer goods
19 2.500000e+12 NaN
20 1.950000e+12 NaN
21 1.600000e+11 NaN
22 1.530000e+12 NaN
23 NaN inherited, cosmetics
24 6.100000e+09 NaN
25 NaN energy, media, banking
26 NaN diversified
27 NaN food manufacturing
28 NaN refinery, chemicals
29 NaN oil and gas
... ... ...
2584 NaN Facebook
2585 NaN agriculture
2586 NaN online retail
2587 NaN pharmceuticals
2588 NaN media
2589 NaN banking, oil
2590 NaN real estate
2591 NaN coal
2592 NaN fertilizers, real estate
2593 NaN finance information service
2594 NaN real estate
2595 NaN diversified
2596 NaN retail
2597 NaN real estate
2598 NaN metals
2599 NaN real estate
2600 NaN internet media
2601 NaN shipbuilding
2602 NaN aluminum
2603 NaN real estate
2604 NaN retail
2605 NaN Internet
2606 NaN solar panel materials
2607 NaN pharmaceuticals
2608 NaN construction
2609 NaN diversified
2610 NaN construction
2611 NaN port, gas
2612 NaN beverages
2613 NaN TV broadcasting
notes \
0 represented Marlon Brando and Elizabeth Taylor
1 represented Marlon Brando and Elizabeth Taylor
2 NaN
3 inherited from father
4 NaN
5 company split between him and cousin in 2000
6 inherited from father
7 NaN
8 NaN
9 NaN
10 3rd generation
11 3rd generation
12 3rd generation
13 kidnapped for 6 days in 1989, inherited from f...
14 kidnapped for 6 days in 1989, inherited from f...
15 kidnapped for 6 days in 1989, inherited from f...
16 NaN
17 NaN
18 3rd generation
19 4th generation
20 4th generation
21 fourth generation?
22 fourth generation?
23 3rd generation
24 3rd generation
25 family involved in textile business from 1930,...
26 NaN
27 inherited from father
28 NaN
29 NaN
... ...
2584 NaN
2585 NaN
2586 NaN
2587 inherited from father
2588 5th generation
2589 NaN
2590 NaN
2591 NaN
2592 NaN
2593 NaN
2594 NaN
2595 only private chinese oil company
2596 NaN
2597 NaN
2598 NaN
2599 NaN
2600 NaN
2601 NaN
2602 NaN
2603 NaN
2604 NaN
2605 former CEO of Yahoo China
2606 NaN
2607 NaN
2608 arrested in 2013 on corruption charges
2609 NaN
2610 close ties with Gazprom
2611 NaN
2612 NaN
2613 NaN
notes2 \
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 no male siblings
11 no male siblings
12 no male siblings
13 NaN
14 NaN
15 NaN
16 NaN
17 NaN
18 NaN
19 NaN
20 NaN
21 NaN
22 NaN
23 NaN
24 With the permission and support of past Bahrai...
25 NaN
26 NaN
27 shareholder
28 NaN
29 NaN
... ...
2584 NaN
2585 NaN
2586 NaN
2587 NaN
2588 chairman, three sisters have 5% ownership in c...
2589 NaN
2590 NaN
2591 NaN
2592 NaN
2593 NaN
2594 NaN
2595 NaN
2596 NaN
2597 NaN
2598 NaN
2599 NaN
2600 NaN
2601 NaN
2602 NaN
2603 NaN
2604 NaN
2605 NaN
2606 NaN
2607 NaN
2608 NaN
2609 NaN
2610 NaN
2611 NaN
2612 NaN
2613 NaN
source \
0 http://en.wikipedia.org/wiki/Jerry_Perenchio
1 http://en.wikipedia.org/wiki/Jerry_Perenchio
2 http://www.jeraisy.com.sa/index.php/pages/rend...
3 NaN
4 http://www.arabianbusiness.com/arabian-busines...
5 http://en.wikipedia.org/wiki/Al-Futtaim_Group
6 http://en.wikipedia.org/wiki/Al-Ghurair_Group
7 http://en.wikipedia.org/wiki/Al-Rajhi_Bank
8 http://en.wikipedia.org/wiki/Al-Rajhi_Bank
9 http://www.forbes.com/profile/abdulsamad-rabiu/
10 http://en.wikipedia.org/wiki/Edward_Johnson,_III
11 http://en.wikipedia.org/wiki/Edward_Johnson,_III
12 http://en.wikipedia.org/wiki/Edward_Johnson,_III
13 http://en.wikipedia.org/wiki/Ab%C3%ADlio_Diniz
14 http://en.wikipedia.org/wiki/Ab%C3%ADlio_Diniz
15 http://en.wikipedia.org/wiki/Ab%C3%ADlio_Diniz
16 http://www.independent.co.uk/news/obituaries/a...
17 http://www.forbes.com/profile/achmad-hamami/
18 http://en.wikipedia.org/wiki/Godrej_family
19 NaN
20 NaN
21 http://www.swire.com/en/about-us/our-story
22 http://www.swire.com/en/about-us/our-story
23 http://en.wikipedia.org/wiki/Jane_Lauder
24 http://www.gulf-daily-news.com/NewsDetails.asp...
25 http://en.wikipedia.org/wiki/Ahmet_%C3%87al%C4...
26 http://www.forbes.com/profile/ahmet-nazif-zorlu/
27 http://en.wikipedia.org/wiki/%C3%9Clker
28 http://www.forbes.com/profile/airat-shaimiev/
29 http://en.wikipedia.org/wiki/Ajay_Kalsi
... ...
2584 http://en.wikipedia.org/wiki/Yuri_Milner
2585 http://www.forbes.com/profile/yuriy-kosiuk/
2586 http://en.wikipedia.org/wiki/Yusaku_Maezawa
2587 http://en.wikipedia.org/wiki/Yusuf_Hamied
2588 http://www.forbes.com/profile/yvonne-bauer/
2589 http://en.wikipedia.org/wiki/Zadik_Bino
2590 http://www.forbes.com/profile/zarakh-iliev/
2591 http://cs.wikipedia.org/wiki/Zden%C4%9Bk_Bakala
2592 http://www.forbes.com/profile/zelimkhan-mutsoev/
2593 http://www.forbes.com/profile/zhang-changhong/
2594 http://www.forbes.com/profile/zhang-guiping/
2595 http://www.forbes.com/sites/russellflannery/20...
2596 http://en.wikipedia.org/wiki/Zhang_Jindong
2597 http://www.rfchina.com/2010e/display.aspx?cati...
2598 http://www.forbes.com/profile/zhang-shiping/
2599 http://en.wikipedia.org/wiki/Zhang_Xin_(busine...
2600 http://www.forbes.com/sites/russellflannery/20...
2601 http://www.forbes.com/profile/zhang-zhirong/
2602 http://www.forbes.com/profile/zhang-zhongneng/
2603 http://www.forbes.com/profile/zhong-sheng-jian/
2604 http://en.wikipedia.org/wiki/Zhou_Chengjian
2605 http://www.forbes.com/profile/zhou-hongyi/
2606 http://investing.businessweek.com/research/sto...
2607 http://www.furenpharm.com/aboutus.asp?cid=82
2608 http://www.forbes.com/profile/zhu-xingliang/
2609 http://www.forbes.com/profile/zhu-yicai/
2610 http://www.forbes.com/profile/ziyad-manasir/
2611 http://www.summagroup.ru/about/history/en/
2612 http://en.wikipedia.org/wiki/Zong_Qinghou
2613 http://en.wikipedia.org/wiki/Zygmunt_Solorz-%C...
source_2 \
0 http://www.forbes.com/profile/a-jerrold-perenc...
1 http://www.forbes.com/profile/a-jerrold-perenc...
2 NaN
3 NaN
4 NaN
5 http://www.al-futtaim.ae/content/groupProfile.asp
6 http://www.alghurair.com/about-us/our-history
7 http://www.alrajhibank.com.sa/ar/investor-rela...
8 http://www.alrajhibank.com.sa/ar/investor-rela...
9 http://www.bloomberg.com/research/stocks/priva...
10 https://www.fidelity.com/about-fidelity/our-he...
11 https://www.fidelity.com/about-fidelity/our-he...
12 https://www.fidelity.com/about-fidelity/our-he...
13 http://www.forbes.com/profile/abilio-dos-santo...
14 http://www.forbes.com/profile/abilio-dos-santo...
15 http://www.forbes.com/profile/abilio-dos-santo...
16 NaN
17 http://www.trakindo.co.id/website/pages/compan...
18 http://www.forbes.com/profile/godrej/
19 NaN
20 NaN
21 NaN
22 NaN
23 http://investing.businessweek.com/research/sto...
24 http://en.wikipedia.org/wiki/Yusuf_Bin_Ahmed_K...
25 http://en.wikipedia.org/wiki/%C3%87al%C4%B1k_H...
26 http://www.zorlu.com/EN/ZORLU/zor_kurucumuz.asp
27 http://www.yildizholding.com.tr/tr/hakkimizda
28 http://en.taif.ru/
29 http://www.indusgas.com/history.php?p=ab
... ...
2584 Science prize announced by Google and Facebook...
2585 http://www.mhp.com.ua/en/about/history
2586 NaN
2587 http://en.wikipedia.org/wiki/Khwaja_Abdul_Hamied
2588 http://en.wikipedia.org/wiki/Bauer_Media_Group
2589 http://en.wikipedia.org/wiki/Paz_Oil_Company_Ltd.
2590 http://www.themoscowtimes.com/news/article/lot...
2591 NaN
2592 http://regionsgroup.ru/en/about1/
2593 http://www.dzhnews.com/about
2594 NaN
2595 NaN
2596 http://en.wikipedia.org/wiki/Suning_Appliance
2597 http://www.forbes.com/profile/zhang-li-1/
2598 http://www.hongqiaochina.com/en/dsgg.aspx
2599 NaN
2600 http://www.therichest.com/celebnetworth/celebr...
2601 http://en.rshi.cn/html/ABOUTUS/History/
2602 http://www.hec-al.com/about.html
2603 http://www.yanlordland.com/en/About_Us5_1.asp
2604 http://www.cnbc.com/2016/01/18/missing-chinese...
2605 http://en.wikipedia.org/wiki/Qihoo
2606 http://gcl-poly.com.hk/en/about_history.php?ye...
2607 http://www.forbes.com/profile/zhu-wenchen/
2608 http://www.goldmantis.com/jtl2013/cn/xxgl.htm
2609 NaN
2610 http://www.themoscowtimes.com/business/article...
2611 http://www.forbes.com/profile/ziyaudin-magomedov/
2612 http://mic.com/articles/39659/zong-qinghou-chi...
2613 No Mob Bosses in This Legal Strategy The New Y...
source_3 source_4
0 COLUMN ONE; A Hollywood Player Who Owns the Ga... NaN
1 COLUMN ONE; A Hollywood Player Who Owns the Ga... NaN
2 NaN NaN
3 NaN NaN
4 NaN NaN
5 NaN NaN
6 NaN NaN
7 http://www.alrajhibank.com.sa/ar/about-us/page... NaN
8 http://www.alrajhibank.com.sa/ar/about-us/page... NaN
9 NaN NaN
10 NaN NaN
11 NaN NaN
12 NaN NaN
13 NaN NaN
14 NaN NaN
15 NaN NaN
16 NaN NaN
17 NaN NaN
18 NaN NaN
19 NaN NaN
20 NaN NaN
21 NaN NaN
22 NaN NaN
23 NaN NaN
24 NaN NaN
25 http://www.calik.com/en/corporate/milestones NaN
26 http://www.bloomberg.com/bw/stories/2003-07-06... NaN
27 NaN NaN
28 NaN NaN
29 NaN NaN
... ... ...
2584 NaN NaN
2585 http://www.mhp.com.ua/en/about/board NaN
2586 NaN NaN
2587 NaN NaN
2588 NaN NaN
2589 NaN NaN
2590 NaN NaN
2591 NaN NaN
2592 NaN NaN
2593 NaN NaN
2594 NaN NaN
2595 NaN NaN
2596 http://topics.wsj.com/person/Z/jindong-zhang/6799 NaN
2597 NaN NaN
2598 NaN NaN
2599 NaN NaN
2600 NaN NaN
2601 NaN NaN
2602 NaN NaN
2603 NaN NaN
2604 NaN NaN
2605 NaN NaN
2606 NaN NaN
2607 NaN NaN
2608 NaN NaN
2609 NaN NaN
2610 NaN NaN
2611 NaN NaN
2612 NaN NaN
2613 NaN NaN
[2614 rows x 30 columns]
What country are most billionaires from? For the top ones, how many billionaires per billion people?
In [11]:
df['citizenship'].value_counts().head()
Out[11]:
United States 903
Germany 160
China 153
Russia 119
Japan 96
Name: citizenship, dtype: int64
In [ ]:
us_pop = 318.9 #billion (2014)
us_bill = df[df['citizenship'] == 'United States']
print("There are", us_pop/len(us_bill), "billionaires per billion people in the United States.")
In [15]:
germ_pop = 0.08062 #(2013)
germ_bill = df[df['citizenship'] == 'Germany']
print("There are", germ_pop/len(germ_bill), "billionaires per billion people in Germany.")
There are 0.000503875 billionaires per billion people in Germany.
In [16]:
china_pop = 1.357 #(2013)
china_bill = df[df['citizenship'] == 'China']
print("There are", china_pop/len(china_bill), "billionaires per billion people in China.")
There are 0.008869281045751633 billionaires per billion people in China.
In [ ]:
russia_pop = 0.1435 #(2013)
russia_bill = df[df['citizenship'] == 'Russia']
print("There are", russia_pop/len(russia_bill), "billionaires per billion people in Russia.")
There are 0.0012058823529411764 billionaires per billion people in Russia.
In [7]:
japan_pop = 0.1273 # 2013
japan_bill = df[df['citizenship'] == 'Japan']
print("There are", japan_pop/len(japan_bill), "billionaires per billion people in Japan.")
There are 0.0013260416666666666 billionaires per billion people in Japan.
In [8]:
print(df.columns)
Index(['year', 'name', 'rank', 'citizenship', 'countrycode',
'networthusbillion', 'selfmade', 'typeofwealth', 'gender', 'age',
'industry', 'IndustryAggregates', 'region', 'north',
'politicalconnection', 'founder', 'generationofinheritance', 'sector',
'company', 'companytype', 'relationshiptocompany', 'foundingdate',
'gdpcurrentus', 'sourceofwealth', 'notes', 'notes2', 'source',
'source_2', 'source_3', 'source_4'],
dtype='object')
Who are the top 10 richest billionaires?
In [26]:
recent = df[df['year'] == 2014]
# if it is not recent then there are duplicates for diff years
recent.sort_values('rank').head(10)
Out[26]:
year
name
rank
citizenship
countrycode
networthusbillion
selfmade
typeofwealth
gender
age
...
relationshiptocompany
foundingdate
gdpcurrentus
sourceofwealth
notes
notes2
source
source_2
source_3
source_4
284
2014
Bill Gates
1
United States
USA
76.0
self-made
founder non-finance
male
58.0
...
founder
1975.0
NaN
Microsoft
NaN
NaN
http://www.forbes.com/profile/bill-gates/
NaN
NaN
NaN
348
2014
Carlos Slim Helu
2
Mexico
MEX
72.0
self-made
privatized and resources
male
74.0
...
founder
1990.0
NaN
telecom
NaN
NaN
http://www.ozy.com/provocateurs/carlos-slims-w...
NaN
NaN
NaN
124
2014
Amancio Ortega
3
Spain
ESP
64.0
self-made
founder non-finance
male
77.0
...
founder
1975.0
NaN
retail
NaN
NaN
http://www.forbes.com/profile/amancio-ortega/
NaN
NaN
NaN
2491
2014
Warren Buffett
4
United States
USA
58.2
self-made
founder non-finance
male
83.0
...
founder
1839.0
NaN
Berkshire Hathaway
NaN
NaN
http://www.forbes.com/lists/2009/10/billionair...
http://www.forbes.com/companies/berkshire-hath...
NaN
NaN
1377
2014
Larry Ellison
5
United States
USA
48.0
self-made
founder non-finance
male
69.0
...
founder
1977.0
NaN
Oracle
NaN
NaN
http://www.forbes.com/profile/larry-ellison/
http://www.businessinsider.com/how-larry-ellis...
NaN
NaN
509
2014
David Koch
6
United States
USA
40.0
inherited
inherited
male
73.0
...
relation
1940.0
NaN
diversified
inherited from father
NaN
http://www.kochind.com/About_Koch/History_Time...
NaN
NaN
NaN
381
2014
Charles Koch
6
United States
USA
40.0
inherited
inherited
male
78.0
...
relation
1940.0
NaN
diversified
inherited from father
NaN
http://www.kochind.com/About_Koch/History_Time...
NaN
NaN
NaN
2185
2014
Sheldon Adelson
8
United States
USA
38.0
self-made
self-made finance
male
80.0
...
founder
1952.0
NaN
casinos
NaN
NaN
http://www.forbes.com/profile/sheldon-adelson/
http://lasvegassun.com/news/1996/nov/26/rat-pa...
NaN
NaN
429
2014
Christy Walton
9
United States
USA
36.7
inherited
inherited
female
59.0
...
relation
1962.0
NaN
Wal-Mart
widow
NaN
http://www.forbes.com/profile/christy-walton/
NaN
NaN
NaN
1128
2014
Jim Walton
10
United States
USA
34.7
inherited
inherited
male
66.0
...
relation
1962.0
NaN
Wal-Mart
inherited from father
NaN
http://www.forbes.com/profile/jim-walton/
NaN
NaN
NaN
10 rows × 30 columns
In [11]:
print("The average wealth of a billionaire is", recent['networthusbillion'].mean(), "billion dollars")
male = recent[(recent['gender'] == 'male')]
female = recent[(recent['gender'] == 'female')]
print("The average wealth of a male billionaire is", male['networthusbillion'].mean(), "billion dollars")
print("The average wealth of a female billionaire is", female['networthusbillion'].mean(), "billion dollars")
The average wealth of a billionaire is 3.90465819722 billion dollars
The average wealth of a male billionaire is 3.9027155465 billion dollars
The average wealth of a female billionaire is 3.92055555556 billion dollars
In [69]:
recent.sort_values('networthusbillion').head(1)
Out[69]:
year
name
rank
citizenship
countrycode
networthusbillion
selfmade
typeofwealth
gender
age
...
relationshiptocompany
foundingdate
gdpcurrentus
sourceofwealth
notes
notes2
source
source_2
source_3
source_4
234
2014
B.R. Shetty
1565
India
IND
1.0
self-made
founder non-finance
male
72.0
...
founder
1975.0
NaN
healthcare
NaN
NaN
http://en.wikipedia.org/wiki/B._R._Shetty
http://www.nmchealth.com/dr-br-shetty/
NaN
NaN
1 rows × 30 columns
In [48]:
# Who are the top 10 poorest billionaires?
In [ ]:
# Who are the top 10 poorest billionaires
In [27]:
recent.sort_values('networthusbillion').head(10)
Out[27]:
year
name
rank
citizenship
countrycode
networthusbillion
selfmade
typeofwealth
gender
age
...
relationshiptocompany
foundingdate
gdpcurrentus
sourceofwealth
notes
notes2
source
source_2
source_3
source_4
234
2014
B.R. Shetty
1565
India
IND
1.0
self-made
founder non-finance
male
72.0
...
founder
1975.0
NaN
healthcare
NaN
NaN
http://en.wikipedia.org/wiki/B._R._Shetty
http://www.nmchealth.com/dr-br-shetty/
NaN
NaN
2092
2014
Rostam Azizi
1565
Tanzania
TZA
1.0
self-made
executive
male
49.0
...
investor
1999.0
NaN
telecom, investments
NaN
NaN
http://www.forbes.com/profile/rostam-azizi/
http://en.wikipedia.org/wiki/Vodacom_Tanzania
http://www.thecitizen.co.tz/News/Rostam--Dewji...
NaN
2401
2014
Tory Burch
1565
United States
USA
1.0
self-made
founder non-finance
female
47.0
...
founder
2004.0
NaN
fashion
NaN
NaN
http://en.wikipedia.org/wiki/J._Christopher_Burch
http://www.vanityfair.com/news/2007/02/tory-bu...
NaN
NaN
734
2014
Fred Chang
1565
United States
USA
1.0
self-made
founder non-finance
male
57.0
...
founder
2001.0
NaN
online retailing
NaN
NaN
http://en.wikipedia.org/wiki/Newegg
http://www.newegg.com/Info/FactSheet.aspx
http://www.forbes.com/sites/andreanavarro/2014...
NaN
171
2014
Angela Bennett
1565
Australia
AUS
1.0
inherited
inherited
female
69.0
...
relation
1955.0
NaN
mining
inherited from father
shared fortune with brother
http://www.forbes.com/profile/angela-bennett/
NaN
NaN
NaN
748
2014
Fu Kwan
1565
China
CHN
1.0
self-made
self-made finance
male
56.0
...
chairman
1990.0
NaN
diversified
NaN
NaN
http://www.forbes.com/profile/fu-kwan/
http://www.macrolink.com.cn/en/AboutBig.aspx
NaN
NaN
2107
2014
Ryan Kavanaugh
1565
United States
USA
1.0
self-made
founder non-finance
male
39.0
...
founder
2004.0
NaN
Movies
NaN
NaN
http://en.wikipedia.org/wiki/Ryan_Kavanaugh
http://en.wikipedia.org/wiki/Relativity_Media
http://www.vanityfair.com/news/2010/03/kavanau...
NaN
1783
2014
O. Francis Biondi
1565
United States
USA
1.0
self-made
self-made finance
male
49.0
...
founder
1995.0
NaN
hedge fund
NaN
NaN
http://www.forbes.com/profile/o-francis-biondi/
http://www.forbes.com/sites/nathanvardi/2014/0...
NaN
NaN
1371
2014
Lam Fong Ngo
1565
Macau
MAC
1.0
self-made
self-made finance
female
NaN
...
Vice Chairman
1997.0
NaN
casinos
NaN
NaN
http://www.forbes.com/profile/david-chow-1/
http://www.macaulegend.com/html/about_mileston...
Macau Legend to roll the dice on HK IPO; But l...
NaN
702
2014
Feng Hailiang
1565
China
CHN
1.0
self-made
founder non-finance
male
53.0
...
founder
1989.0
NaN
copper processing & real estate
NaN
NaN
http://www.forbes.com/profile/feng-hailiang/
http://www.hailiang.com/en/about_int.php
NaN
NaN
10 rows × 30 columns
In [14]:
# 'What is relationship to company'? And what are the most common relationships?
In [28]:
#top 10 most common relationships to company
df['relationshiptocompany'].value_counts().head(10)
Out[28]:
founder 1214
relation 945
owner 94
chairman 76
investor 36
Chairman and Chief Executive Officer 29
CEO 16
president 13
ceo 9
Chairman 8
Name: relationshiptocompany, dtype: int64
In [19]:
# Most common source of wealth? Male vs. female?
In [18]:
# Most common source of wealth? Male vs. female
In [83]:
print("The most common source of wealth is", df['sourceofwealth'].value_counts().head(1))
print("The most common source of wealth for males is", male['sourceofwealth'].value_counts().head(1))
print("The most common source of wealth for females is", female['sourceofwealth'].value_counts().head(1))
#need to figure out how to extract just the number nd not the data type 'Name: sourceofwealth, dtype: int64'
The most common source of wealth is real estate 107
Name: sourceofwealth, dtype: int64
The most common source of wealth for males is real estate 100
Name: sourceofwealth, dtype: int64
The most common source of wealth for females is diversified 9
Name: sourceofwealth, dtype: int64
Given the richest person in a country, what % of the GDP is their wealth?
In [19]:
richest = df[df['citizenship'] == 'United States'].sort_values('rank').head(1)['networthusbillion'].to_dict()
# richest['networthusbillion']
richest[282]
## I JUST WANT THE VALUE -- 18.5.
## 16.77 TRILLION
US_GDP = 1.677 * (10^13)
US_GDP
Out[19]:
11.739
Add up the wealth of all of the billionaires in a given country (or a few countries) and then compare it to the GDP of the country, or other billionaires, so like pit the US vs India
In [ ]:
What are the most common industries for billionaires to come from? What's the total amount of billionaire money from each industry?
In [115]:
recent['sector'].value_counts().head(10)
Out[115]:
real estate 122
retail 78
construction 60
pharmaceuticals 55
media 50
banking 47
hedge funds 44
oil 40
software 39
private equity 23
Name: sector, dtype: int64
In [119]:
df.groupby('sector')['networthusbillion'].sum()
Out[119]:
sector
Oil refining 57.8
Communications 88.9
Finance 112.8
Oil refining 45.2
Software 153.2
casinos 39.0
fashion 45.9
finance 41.5
retail 66.5
software 80.0
technology 126.6
Banking 13.3
Fashion 70.6
GPS technology 4.1
HR consulting 6.0
IT Consulting 2.4
Star Wars 9.9
advertising 21.4
aerospace and defense 5.1
agribusiness 7.2
agriculteral 2.4
agricultural products 5.5
agriculture 9.6
aigriculture 2.5
air compressors 1.6
aircraft leasing 10.3
airline 4.6
airplanes 3.2
airport 3.9
airport maintenance 6.4
...
trade investment 9.5
trading 2.5
trading company 4.3
transportation 18.5
travel company 12.2
truck stop 1.5
truck stops 3.6
trucking 2.2
trucking 2.1
trucking and logistics 2.2
uniforms 1.8
utilities 11.0
utilities/financial services 5.1
vacuum cleaners 4.5
venture capitalist 40.3
video games 7.9
video technology 2.7
waste management 7.6
watch retail 1.1
watches 3.5
web broadcasting 4.0
wind energy 3.7
wine 1.7
wine and spirits 3.3
winter jackets 1.4
wireless products 2.7
wool 1.0
wrestling promotion 1.2
yogurt 1.4
zippers 3.5
Name: networthusbillion, dtype: float64
How many self made billionaires vs. others?
In [29]:
(recent['selfmade'] == 'self-made').value_counts()
Out[29]:
True 1146
False 507
Name: selfmade, dtype: int64
How old are billionaires?
In [47]:
# recent['age'].value_counts().sort_values()
print("The average billionnaire is", round(recent['age'].mean()), "years old.")
The average billionnaire is 63.0 years old.
In [82]:
df.groupby('selfmade')['age'].mean()
Out[82]:
selfmade
inherited 54.912000
self-made 59.474576
Name: age, dtype: float64
In [ ]:
# or different industries?
In [84]:
df.groupby('sector')['age'].mean()
Out[84]:
sector
Oil refining 69.400000
Communications 63.666667
Finance 74.125000
Oil refining 62.666667
Software 47.666667
casinos 73.500000
fashion 57.750000
finance 61.600000
retail 55.000000
software 58.666667
technology 39.200000
Banking 49.250000
Fashion 71.000000
GPS technology 70.500000
HR consulting 71.500000
IT Consulting 61.000000
Star Wars 58.666667
advertising 68.250000
aerospace and defense 72.500000
agribusiness 56.500000
agriculteral 59.000000
agricultural products 89.500000
agriculture 48.800000
aigriculture 52.500000
air compressors 51.000000
aircraft leasing 64.000000
airline 47.000000
airplanes 27.500000
airport 53.500000
airport maintenance 61.666667
...
trade investment 63.500000
trading NaN
trading company 35.000000
transportation 69.750000
travel company 69.200000
truck stop 60.000000
truck stops NaN
trucking 32.500000
trucking 82.000000
trucking and logistics 76.000000
uniforms 66.000000
utilities 63.500000
utilities/financial services 85.000000
vacuum cleaners 66.000000
venture capitalist 52.066667
video games 48.000000
video technology 72.000000
waste management 61.250000
watch retail 70.000000
watches 72.000000
web broadcasting 47.500000
wind energy 62.000000
wine 71.000000
wine and spirits 71.000000
winter jackets 52.000000
wireless products 35.000000
wool 0.000000
wrestling promotion 68.000000
yogurt 42.000000
zippers 51.500000
Name: age, dtype: float64
In [49]:
#youngest billionnaires
recent.sort_values('age').head(10)
Out[49]:
year
name
rank
citizenship
countrycode
networthusbillion
selfmade
typeofwealth
gender
age
...
relationshiptocompany
foundingdate
gdpcurrentus
sourceofwealth
notes
notes2
source
source_2
source_3
source_4
1838
2014
Perenna Kei
1284
Hong Kong
HKG
1.3
inherited
inherited
female
24.0
...
relation
1996.0
NaN
real estate
inherited from father
NaN
http://en.wikipedia.org/wiki/Perenna_Kei
http://www.loganestate.com/en/about.aspx?ftid=294
NaN
NaN
605
2014
Dustin Moskovitz
202
United States
USA
6.8
self-made
founder non-finance
male
29.0
...
founder
2004.0
NaN
Facebook
NaN
NaN
http://en.wikipedia.org/wiki/Dustin_Moskovitz
http://www.forbes.com/profile/dustin-moskovitz/
https://www.facebook.com/facebook/info?tab=pag...
NaN
1586
2014
Mark Zuckerberg
21
United States
USA
28.5
self-made
founder non-finance
male
29.0
...
founder
2004.0
NaN
Facebook
NaN
NaN
http://www.forbes.com/profile/mark-zuckerberg/
NaN
NaN
NaN
189
2014
Anton Kathrein, Jr.
1270
Germany
DEU
1.4
inherited
inherited
male
29.0
...
relation
1919.0
NaN
antennas
3rd generation
NaN
http://www.forbes.com/profile/anton-kathrein-jr/#
NaN
NaN
NaN
602
2014
Drew Houston
1372
United States
USA
1.2
self-made
founder non-finance
male
30.0
...
founder
2007.0
NaN
Dropbox
NaN
NaN
http://en.wikipedia.org/wiki/Drew_Houston
http://en.wikipedia.org/wiki/Dropbox_(service)
http://www.forbes.com/profile/drew-houston/
NaN
54
2014
Albert von Thurn und Taxis
1092
Germany
DEU
1.6
inherited
inherited
male
30.0
...
relation
1615.0
NaN
diversified
monopoly on postal service in germany, nationa...
two older sisters, did not inherit title becau...
http://en.wikipedia.org/wiki/Thurn_und_Taxis
http://en.wikipedia.org/wiki/Albert,_12th_Prin...
NaN
NaN
618
2014
Eduardo Saverin
367
Brazil
BRA
4.1
self-made
founder non-finance
male
31.0
...
founder
2004.0
NaN
Facebook
NaN
NaN
http://en.wikipedia.org/wiki/Eduardo_Saverin
http://www.bloomberg.com/news/articles/2012-05...
NaN
NaN
2151
2014
Scott Duncan
215
United States
USA
6.3
inherited
inherited
male
31.0
...
relation
1968.0
NaN
pipelines
inherited from father
NaN
http://en.wikipedia.org/wiki/Scott_Duncan_(bus...
http://www.forbes.com/profile/dannine-avara/
NaN
NaN
2559
2014
Yang Huiyan
196
China
CHN
6.9
inherited
inherited
female
32.0
...
relation
1997.0
NaN
real estate
inherited from father
NaN
http://en.wikipedia.org/wiki/Yang_Huiyan
NaN
NaN
NaN
1569
2014
Marie Besnier Beauvalot
642
France
FRA
2.7
inherited
inherited
female
33.0
...
relation
1933.0
NaN
cheese
inherited from father
oldest brother is CEO
http://www.forbes.com/profile/emmanuel-besnier/
http://en.wikipedia.org/wiki/Lactalis
NaN
NaN
10 rows × 30 columns
In [50]:
#oldest billionnaires
recent.sort_values('age', ascending =False).head(10)
Out[50]:
year
name
rank
citizenship
countrycode
networthusbillion
selfmade
typeofwealth
gender
age
...
relationshiptocompany
foundingdate
gdpcurrentus
sourceofwealth
notes
notes2
source
source_2
source_3
source_4
516
2014
David Rockefeller, Sr.
580
United States
USA
2.9
inherited
inherited
male
98.0
...
relation
1870.0
NaN
oil, banking
family made most of fortune in the late 19th a...
NaN
http://en.wikipedia.org/wiki/David_Rockefeller
http://en.wikipedia.org/wiki/Standard_Oil
http://en.wikipedia.org/wiki/Rockefeller_family
NaN
1277
2014
Karl Wlaschek
305
Austria
AUT
4.8
self-made
founder non-finance
male
96.0
...
founder
1953.0
NaN
retail
NaN
NaN
http://en.wikipedia.org/wiki/BILLA
http://en.wikipedia.org/wiki/Karl_Wlaschek
https://www.billa.at/Footer_Nav_Seiten/Geschic...
NaN
1328
2014
Kirk Kerkorian
328
United States
USA
4.5
self-made
self-made finance
male
96.0
...
investor
1924.0
NaN
casinos, investments
purchased in 1969
NaN
http://en.wikipedia.org/wiki/Kirk_Kerkorian
http://www.forbes.com/profile/kirk-kerkorian/
PROFILE: Las Vegas billionaire amassed his wea...
NaN
921
2014
Henry Hillman
687
United States
USA
2.5
inherited
inherited
male
95.0
...
relation
1942.0
NaN
investments
inherited from father
NaN
http://www.forbes.com/profile/henry-hillman/
http://en.wikipedia.org/wiki/Calgon_Carbon
NaN
NaN
666
2014
Erika Pohl-Stroher
1154
Germany
DEU
1.5
inherited
inherited
female
95.0
...
relation
1880.0
NaN
hair products
3rd generation
23% stake in the company
http://www.forbes.com/profile/erika-pohl-stroher/
http://en.wikipedia.org/wiki/Wella
NaN
NaN
2292
2014
Sulaiman Al Rajhi
931
Saudi Arabia
SAU
1.9
self-made
self-made finance
male
94.0
...
founder
1957.0
NaN
banking
NaN
NaN
http://en.wikipedia.org/wiki/Al-Rajhi_Bank
http://www.alrajhibank.com.sa/ar/investor-rela...
http://www.alrajhibank.com.sa/ar/about-us/page...
NaN
181
2014
Anne Cox Chambers
58
United States
USA
15.5
inherited
inherited
female
94.0
...
relation
1898.0
NaN
media
inherited from brother
NaN
http://en.wikipedia.org/wiki/Anne_Cox_Chambers
http://www.forbes.com/lists/2010/10/billionair...
http://www.nytimes.com/2007/05/30/business/med...
NaN
1275
2014
Karl Albrecht
23
Germany
DEU
25.0
self-made
executive
male
94.0
...
relation
1914.0
NaN
retail
(split from Aldi Nord in 1966, but both branch...
took over mother's single grocerty store
http://en.wikipedia.org/wiki/Karl_Albrecht
http://www.bloomberg.com/news/articles/2014-07...
http://aldiuscareers.com/about-aldi/history
NaN
119
2014
Aloysio de Andrade Faria
483
Brazil
BRA
3.3
inherited
inherited
male
93.0
...
relation
1925.0
NaN
banking
inherited from father
NaN
http://en.wikipedia.org/wiki/Aloysio_de_Andrad...
http://en.wikipedia.org/wiki/Banco_da_Lavoura_...
http://www.forbes.com/profile/aloysio-de-andra...
NaN
2487
2014
Wang Yung-Tsai
520
Taiwan
Taiwan
3.1
self-made
founder non-finance
male
93.0
...
founder
1954.0
NaN
plastics
NaN
NaN
http://www.forbes.com/profile/wang-yung-tsai/
What's good for the goose South China Morning ...
NaN
NaN
10 rows × 30 columns
In [ ]:
#Age distribution - maybe make a graph about it?
In [65]:
import matplotlib.pyplot as plt
%matplotlib inline
# This will scream we don't have matplotlib.
his = df['age'].hist(range=[0, 100])
his.set_title('Distribution of Age Amongst Billionaires')
his.set_xlabel('Age(years)')
his.set_ylabel('# of Billionnaires')
Out[65]:
<matplotlib.text.Text at 0x10787d2b0>
In [ ]:
# Maybe just made a graph about how wealthy they are in general?
In [77]:
import matplotlib.pyplot as plt
%matplotlib inline
# This will scream we don't have matplotlib.
his = df['networthusbillion'].hist(range=[0, 45])
his.set_title('Distribution of Wealth Amongst Billionaires')
his.set_xlabel('Wealth(Billions)')
his.set_ylabel('# of Billionnaires')
Out[77]:
<matplotlib.text.Text at 0x1081885f8>
Maybe plot their net worth vs age (scatterplot) Make a bar graph of the top 10 or 20 richest
In [79]:
recent.plot(kind='scatter', x='networthusbillion', y='age')
Out[79]:
<matplotlib.axes._subplots.AxesSubplot at 0x107df8f60>
In [81]:
recent.plot(kind='scatter', x='age', y='networthusbillion')
Out[81]:
<matplotlib.axes._subplots.AxesSubplot at 0x1083d4400>
In [ ]:
Content source: M0nica/python-foundations-hw
Similar notebooks: