In [101]:
import pandas as pd

In [102]:
df = pd.read_excel("richpeople.xlsx")

In [103]:
df.head()


Out[103]:
year name rank citizenship countrycode networthusbillion selfmade typeofwealth gender age ... relationshiptocompany foundingdate gdpcurrentus sourceofwealth notes notes2 source source_2 source_3 source_4
0 2001 A Jerrold Perenchio 151 United States USA 3.0 self-made executive male 70.0 ... former chairman and CEO 1955.0 1.062180e+13 NaN represented Marlon Brando and Elizabeth Taylor NaN http://en.wikipedia.org/wiki/Jerry_Perenchio http://www.forbes.com/profile/a-jerrold-perenc... COLUMN ONE; A Hollywood Player Who Owns the Ga... NaN
1 2014 A. Jerrold Perenchio 663 United States USA 2.6 self-made executive male 83.0 ... former chairman and CEO 1955.0 NaN television, Univision represented Marlon Brando and Elizabeth Taylor NaN http://en.wikipedia.org/wiki/Jerry_Perenchio http://www.forbes.com/profile/a-jerrold-perenc... COLUMN ONE; A Hollywood Player Who Owns the Ga... NaN
2 2001 Abdul Al Rahman Al Jeraisy 336 Saudi Arabia SAU 1.5 self-made founder non-finance male NaN ... founder 1956.0 1.830120e+11 NaN NaN NaN http://www.jeraisy.com.sa/index.php/pages/rend... NaN NaN NaN
3 2001 Abdul Aziz Al Ghurair 251 United Arab Emirates ARE 1.9 inherited inherited male 47.0 ... relation 1960.0 1.030000e+11 NaN inherited from father NaN NaN NaN NaN NaN
4 1996 Abdul Aziz Al-Sulaiman 404 Saudi Arabia SAU 1.0 self-made self-made finance male 0.0 ... founder 1968.0 1.577430e+11 NaN NaN NaN http://www.arabianbusiness.com/arabian-busines... NaN NaN NaN

5 rows × 30 columns


In [104]:
df.columns


Out[104]:
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')

In [105]:
df.columns.values


Out[105]:
array(['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)

In [106]:
df = df[df['year'] == 2014]

1. What country are most billionaires from? For the top ones, how many billionaires per billion people?


In [107]:
print("Most billionaires are from the following countries in descending order:")

df['countrycode'].value_counts().head(5)


Most billionaires are from the following countries in descending order:
Out[107]:
USA    499
CHN    152
RUS    111
DEU     85
BRA     65
Name: countrycode, dtype: int64

In [108]:
us = 903 / 1000000000
ger = 160 / 1000000000
china = 153 / 1000000000
russia = 119 / 1000000000
japan = 96 / 1000000000

print("per billion for us is", us, "for germany is", ger, "for china is", china, "for russia is", russia, "for japan is", japan)


per billion for us is 9.03e-07 for germany is 1.6e-07 for china is 1.53e-07 for russia is 1.19e-07 for japan is 9.6e-08

2. What's the average wealth of a billionaire? Male? Female?


In [109]:
df['networthusbillion'].describe()


Out[109]:
count    1653.000000
mean        3.904658
std         5.748520
min         1.000000
25%         1.400000
50%         2.100000
75%         3.700000
max        76.000000
Name: networthusbillion, dtype: float64

In [110]:
print("Average wealth of a billionaire is 3.531943")


Average wealth of a billionaire is 3.531943

In [111]:
male = df[df['gender'] == "male"]

In [112]:
male.head()


Out[112]:
year name rank citizenship countrycode networthusbillion selfmade typeofwealth gender age ... relationshiptocompany foundingdate gdpcurrentus sourceofwealth notes notes2 source source_2 source_3 source_4
1 2014 A. Jerrold Perenchio 663 United States USA 2.6 self-made executive male 83.0 ... former chairman and CEO 1955.0 NaN television, Univision represented Marlon Brando and Elizabeth Taylor NaN http://en.wikipedia.org/wiki/Jerry_Perenchio http://www.forbes.com/profile/a-jerrold-perenc... COLUMN ONE; A Hollywood Player Who Owns the Ga... NaN
5 2014 Abdulla Al Futtaim 687 United Arab Emirates ARE 2.5 inherited inherited male NaN ... relation 1930.0 NaN auto dealers, investments company split between him and cousin in 2000 NaN http://en.wikipedia.org/wiki/Al-Futtaim_Group http://www.al-futtaim.ae/content/groupProfile.asp NaN NaN
6 2014 Abdulla bin Ahmad Al Ghurair 305 United Arab Emirates ARE 4.8 inherited inherited male NaN ... relation 1960.0 NaN diversified inherited from father NaN http://en.wikipedia.org/wiki/Al-Ghurair_Group http://www.alghurair.com/about-us/our-history NaN NaN
8 2014 Abdullah Al Rajhi 731 Saudi Arabia SAU 2.4 self-made self-made finance male NaN ... 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
9 2014 Abdulsamad Rabiu 1372 Nigeria NGA 1.2 self-made founder non-finance male 54.0 ... founder 1988.0 NaN sugar, flour, cement NaN NaN http://www.forbes.com/profile/abdulsamad-rabiu/ http://www.bloomberg.com/research/stocks/priva... NaN NaN

5 rows × 30 columns


In [113]:
male['networthusbillion'].describe()


Out[113]:
count    1473.000000
mean        3.902716
std         5.801227
min         1.000000
25%         1.400000
50%         2.100000
75%         3.700000
max        76.000000
Name: networthusbillion, dtype: float64

In [114]:
print("The average wealth of male billionaires is 3.516881")


The average wealth of male billionaires is 3.516881

In [115]:
female = df[df['gender'] == "female"]

In [116]:
female['networthusbillion'].describe()


Out[116]:
count    180.000000
mean       3.920556
std        5.312604
min        1.000000
25%        1.400000
50%        2.300000
75%        3.700000
max       36.700000
Name: networthusbillion, dtype: float64

In [117]:
print("The average wealth of female billionaires is 3.819277")


The average wealth of female billionaires is 3.819277

3. Most common source of wealth? Male vs. female?


In [118]:
print("Most common source of wealth are:")
df['sourceofwealth'].value_counts().head()


Most common source of wealth are:
Out[118]:
real estate        107
diversified         69
retail              63
investments         60
pharmaceuticals     42
Name: sourceofwealth, dtype: int64

In [119]:
print("Most common source of wealth for male billionaires are:")
male['sourceofwealth'].value_counts().head()


Most common source of wealth for male billionaires are:
Out[119]:
real estate        100
retail              60
diversified         60
investments         58
pharmaceuticals     40
Name: sourceofwealth, dtype: int64

In [120]:
print("Most common source of wealth for female billionaires are:")
female['sourceofwealth'].value_counts().head()


Most common source of wealth for female billionaires are:
Out[120]:
diversified       9
real estate       7
media             6
consumer goods    5
construction      5
Name: sourceofwealth, dtype: int64

4. List top ten billionaires


In [121]:
bill =  df.sort_values('networthusbillion', ascending=False).head(10)

In [122]:
df.sort_values('networthusbillion', ascending=False).head(10)


Out[122]:
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 [123]:
print("A precise list of billionaires, wealth and rank is given below:")
columns_want = bill[['name', 'rank', 'networthusbillion']]
columns_want


A precise list of billionaires, wealth and rank is given below:
Out[123]:
name rank networthusbillion
284 Bill Gates 1 76.0
348 Carlos Slim Helu 2 72.0
124 Amancio Ortega 3 64.0
2491 Warren Buffett 4 58.2
1377 Larry Ellison 5 48.0
509 David Koch 6 40.0
381 Charles Koch 6 40.0
2185 Sheldon Adelson 8 38.0
429 Christy Walton 9 36.7
1128 Jim Walton 10 34.7

5.Given the richest person in a country, what % of the GDP is their wealth?


In [124]:
us_gdp = 7419  

wealth_rich = 76 

percent = round((wealth_rich * 100) / us_gdp)

print(percent, "% of the US GDP is their wealth")


1 % of the US GDP is their wealth

6.What are the most common industries for billionaires to come from? What's the total amount of billionaire money from each industry?


In [125]:
print("the most common industries for billionaires to come from are:")
df['industry'].value_counts()


the most common industries for billionaires to come from are:
Out[125]:
Consumer                           291
Real Estate                        190
Retail, Restaurant                 174
Diversified financial              132
Technology-Computer                131
Money Management                   122
Media                              104
Energy                              87
Non-consumer industrial             83
Technology-Medical                  78
Mining and metals                   68
Constrution                         61
Other                               59
Hedge funds                         43
Private equity/leveraged buyout     18
0                                    6
Venture Capital                      5
Name: industry, dtype: int64

In [126]:
columns_we_want = df[['name', 'networthusbillion', 'industry']]
columns_we_want


Out[126]:
name networthusbillion industry
1 A. Jerrold Perenchio 2.6 Media
5 Abdulla Al Futtaim 2.5 Retail, Restaurant
6 Abdulla bin Ahmad Al Ghurair 4.8 Diversified financial
8 Abdullah Al Rajhi 2.4 Money Management
9 Abdulsamad Rabiu 1.2 Consumer
12 Abigail Johnson 17.3 Money Management
15 Abilio dos Santos Diniz 2.8 Retail, Restaurant
17 Achmad Hamami 1.6 Non-consumer industrial
18 Adi Godrej 3.5 Consumer
23 Aerin Lauder Zinterhofer 1.1 Consumer
25 Ahmet Calik 1.1 Energy
26 Ahmet Nazif Zorlu 1.2 Diversified financial
27 Ahsen Ozokur 1.6 Consumer
28 Airat Shaimiev 1.1 Energy
29 Ajay Kalsi 1.9 Energy
30 Ajay Piramal 1.5 Technology-Medical
34 Akio Nitori 1.3 Retail, Restaurant
37 Akira Mori 4.2 Real Estate
38 Alain Bouchard 1.8 Retail, Restaurant
39 Alain Merieux 3.8 Technology-Medical
40 Alain Taravella 1.3 Real Estate
43 Alain Wertheimer 9.0 Consumer
45 Alan Gerry 1.4 Media
46 Alan Howard 1.6 Hedge funds
47 Alan Rydge 1.1 Media
48 Albert Blokker 1.4 Retail, Restaurant
50 Albert Frere 4.9 Diversified financial
51 Albert Shigaboutdinov 1.1 Energy
54 Albert von Thurn und Taxis 1.6 Diversified financial
55 Albert Yeung 1.1 Real Estate
... ... ... ...
2584 Yuri Milner 1.8 Technology-Computer
2585 Yuriy Kosiuk 1.5 Consumer
2586 Yusaku Maezawa 1.3 Technology-Computer
2587 Yusuf Hamied 1.1 Technology-Medical
2588 Yvonne Bauer 3.5 Media
2589 Zadik Bino 1.1 Money Management
2590 Zarakh Iliev 3.6 Real Estate
2591 Zdenek Bakala 1.0 Mining and metals
2592 Zelimkhan Mutsoev 1.3 Consumer
2593 Zhang Changhong 1.5 Money Management
2594 Zhang Guiping 1.1 Real Estate
2595 Zhang Hongwei 1.7 Diversified financial
2596 Zhang Jindong 3.7 Retail, Restaurant
2597 Zhang Li 2.1 Real Estate
2598 Zhang Shiping 3.6 Mining and metals
2599 Zhang Xin 3.7 Real Estate
2600 Zhang Zhidong 4.8 Technology-Computer
2601 Zhang Zhirong 1.8 Non-consumer industrial
2602 Zhang Zhongneng 1.2 Mining and metals
2603 Zhong Sheng Jian 1.2 Real Estate
2604 Zhou Chengjian 1.6 Retail, Restaurant
2605 Zhou Hongyi 2.1 Technology-Computer
2606 Zhu Gongshan 2.1 Energy
2607 Zhu Wenchen 1.0 Technology-Medical
2608 Zhu Xingliang 1.8 Constrution
2609 Zhu Yicai 1.5 Diversified financial
2610 Ziyad Manasir 2.8 Constrution
2611 Ziyaudin Magomedov 1.2 Energy
2612 Zong Qinghou 11.6 Consumer
2613 Zygmunt Solorz-Zak 3.5 Media

1653 rows × 3 columns


In [127]:
print("the total amount of billionaire money from each industry are given below:")
columns_we_want.groupby('industry').describe()


the total amount of billionaire money from each industry are given below:
Out[127]:
networthusbillion
industry
0 count 6.000000
mean 1.266667
std 0.320416
min 1.000000
25% 1.125000
50% 1.200000
75% 1.200000
max 1.900000
Constrution count 61.000000
mean 2.875410
std 3.435872
min 1.000000
25% 1.500000
50% 1.800000
75% 2.900000
max 25.000000
Consumer count 291.000000
mean 4.047423
std 5.814591
min 1.000000
25% 1.400000
50% 2.400000
75% 3.500000
max 58.200000
Diversified financial count 132.000000
mean 4.654545
std 6.389882
min 1.000000
25% 1.600000
50% 2.500000
... ... ...
Retail, Restaurant std 7.807420
min 1.000000
25% 1.500000
50% 2.450000
75% 4.000000
max 64.000000
Technology-Computer count 131.000000
mean 5.225954
std 9.201100
min 1.000000
25% 1.400000
50% 2.200000
75% 4.350000
max 76.000000
Technology-Medical count 78.000000
mean 2.794872
std 2.508629
min 1.000000
25% 1.225000
50% 1.850000
75% 3.375000
max 12.800000
Venture Capital count 5.000000
mean 2.220000
std 0.846759
min 1.500000
25% 1.500000
50% 1.900000
75% 2.800000
max 3.400000

136 rows × 1 columns

7.How many self made billionaires vs. others?


In [128]:
#columnswant = df[['name', 'networthusbillion', 'selfmade']]
#columnswant

In [129]:
print("The number of selfmade billionaires are:")
df['selfmade'].value_counts()


The number of selfmade billionaires are:
Out[129]:
self-made    1146
inherited     505
Name: selfmade, dtype: int64

8.How old are billionaires? How old are billionaires self made vs. non self made? or different industries?


In [130]:
columns_want = df[['name', 'age', 'selfmade']]
columns_want.head(10)


Out[130]:
name age selfmade
1 A. Jerrold Perenchio 83.0 self-made
5 Abdulla Al Futtaim NaN inherited
6 Abdulla bin Ahmad Al Ghurair NaN inherited
8 Abdullah Al Rajhi NaN self-made
9 Abdulsamad Rabiu 54.0 self-made
12 Abigail Johnson 52.0 inherited
15 Abilio dos Santos Diniz 77.0 inherited
17 Achmad Hamami 83.0 self-made
18 Adi Godrej 71.0 inherited
23 Aerin Lauder Zinterhofer 44.0 inherited

In [131]:
columns_want = df[['name', 'age', 'industry']]
columns_want.head(10)


Out[131]:
name age industry
1 A. Jerrold Perenchio 83.0 Media
5 Abdulla Al Futtaim NaN Retail, Restaurant
6 Abdulla bin Ahmad Al Ghurair NaN Diversified financial
8 Abdullah Al Rajhi NaN Money Management
9 Abdulsamad Rabiu 54.0 Consumer
12 Abigail Johnson 52.0 Money Management
15 Abilio dos Santos Diniz 77.0 Retail, Restaurant
17 Achmad Hamami 83.0 Non-consumer industrial
18 Adi Godrej 71.0 Consumer
23 Aerin Lauder Zinterhofer 44.0 Consumer

In [132]:
columns_want.sort_values('age', ascending=False)


Out[132]:
name age industry
516 David Rockefeller, Sr. 98.0 Energy
1277 Karl Wlaschek 96.0 Retail, Restaurant
1328 Kirk Kerkorian 96.0 Real Estate
921 Henry Hillman 95.0 Diversified financial
666 Erika Pohl-Stroher 95.0 Consumer
2292 Sulaiman Al Rajhi 94.0 Money Management
181 Anne Cox Chambers 94.0 Media
1275 Karl Albrecht 94.0 Retail, Restaurant
119 Aloysio de Andrade Faria 93.0 Money Management
2487 Wang Yung-Tsai 93.0 Non-consumer industrial
1553 Marcel Adams 93.0 Real Estate
2530 William Moncrief, Jr. 93.0 Energy
493 David Consunji 92.0 Constrution
776 George Joseph 92.0 Money Management
2117 S. Truett Cathy 92.0 Retail, Restaurant
992 Ingeburg Herz 92.0 Consumer
1034 Jacques Servier 92.0 Technology-Medical
2237 Stanley Perron 91.0 Real Estate
1021 Jack Taylor 91.0 Retail, Restaurant
1469 Liliane Bettencourt 91.0 Consumer
487 David Azrieli 91.0 Real Estate
79 Alexander Spanos 90.0 Real Estate
306 Brijmohan Lall Munjal 90.0 Consumer
98 Alfred Taubman 90.0 Real Estate
2029 Robert Kuok 90.0 Diversified financial
1419 Len Ainsworth 90.0 Consumer
383 Charles Munger 90.0 Consumer
1280 Karl-Heinz Kipp 90.0 Retail, Restaurant
511 David Murdock 90.0 Consumer
2298 Sumner Redstone 90.0 Media
... ... ... ...
1527 Lynda Resnick NaN Consumer
1539 Majid Al Futtaim NaN Real Estate
1542 Malvinder and Shivinder Singh NaN Technology-Medical
1567 Marian Ilitch NaN Retail, Restaurant
1590 Martin & Olivier Bouygues NaN Constrution
1605 Mary Perkins NaN Retail, Restaurant
1619 Matt & Dan Walsh NaN Constrution
1634 Michael & Rainer Schmidt-Ruthenbeck NaN Retail, Restaurant
1651 Michael Ilitch NaN Retail, Restaurant
1717 Mohannad Al-Kharafi NaN Diversified financial
1803 Paolo & Gianfelice Mario Rocca NaN Non-consumer industrial
1836 Peggy Cherng NaN Retail, Restaurant
1869 Philip Green NaN Retail, Restaurant
1921 Rafaela Aponte NaN Other
2008 Robert & Philip Ng NaN Real Estate
2047 Roberta Anamaria Civita NaN Media
2088 Rosa Anna Magno Garavoglia NaN Consumer
2119 Saif Al Ghurair NaN Diversified financial
2181 Shashi and Ravi Ruia NaN Diversified financial
2284 Stewart Resnick NaN Consumer
2317 T.Y. Tsai NaN Money Management
2324 Taizo Son NaN Retail, Restaurant
2357 Thomas and Raymond Kwok NaN Real Estate
2367 Thomas Meyer NaN Consumer
2396 Tom Love NaN Retail, Restaurant
2403 Tsai Cheng-da NaN Money Management
2420 Vanich Chaiyawan NaN Money Management
2425 Victor Civita Neto NaN Media
2480 Wang Wei NaN Retail, Restaurant
2549 Wu Xiong NaN Consumer

1653 rows × 3 columns

9.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, so like pit the US vs India


In [133]:
is_in_us = df[df['countrycode'] == "USA"]

In [134]:
is_in_us['networthusbillion'].describe()


Out[134]:
count    499.000000
mean       4.654108
std        7.420218
min        1.000000
25%        1.600000
50%        2.500000
75%        4.000000
max       76.000000
Name: networthusbillion, dtype: float64

In [135]:
print("The total wealth of billionaires in US is 903")


The total wealth of billionaires in US is 903

Compare the total wealth of billionaires in US to the GDP of the country, so like pit the US vs India¶


In [136]:
gdp_india = 2066.90

us_bill_wealth = 903

percent = round((us_bill_wealth * 100) / gdp_india)

print(percent, "% of the India GDP is the wealth of US billionaires")


44 % of the India GDP is the wealth of US billionaires

10. List top 10 poorest billionaires. Who is the poorest billionare ?


In [137]:
df.sort_values('networthusbillion').head(10)


Out[137]:
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 [138]:
print("The poorest billionaire is")
df.sort_values('networthusbillion').head(1)


The poorest billionaire is
Out[138]:
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

11. List ten youngest billionaires, list ten oldest billionaires, and plot and age distribution graph


In [139]:
print("The ten youngest billionaires are: ")
df.sort_values('age').head(10)


The ten youngest billionaires are: 
Out[139]:
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 [140]:
print("The ten oldest billionaires are: ")

df.sort_values('age', ascending=False).head(10)


The ten oldest billionaires are: 
Out[140]:
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 [141]:
columns_want = df[['name', 'age', 'industry']]
columns_want.sort_values('age', ascending=False).head(10)


Out[141]:
name age industry
516 David Rockefeller, Sr. 98.0 Energy
1277 Karl Wlaschek 96.0 Retail, Restaurant
1328 Kirk Kerkorian 96.0 Real Estate
921 Henry Hillman 95.0 Diversified financial
666 Erika Pohl-Stroher 95.0 Consumer
2292 Sulaiman Al Rajhi 94.0 Money Management
181 Anne Cox Chambers 94.0 Media
1275 Karl Albrecht 94.0 Retail, Restaurant
119 Aloysio de Andrade Faria 93.0 Money Management
2487 Wang Yung-Tsai 93.0 Non-consumer industrial

11b. Plot an age distribution graph


In [142]:
import matplotlib.pyplot as plt

In [143]:
%matplotlib inline

In [144]:
df.plot(kind='scatter', x='age', y='networthusbillion')


Out[144]:
<matplotlib.axes._subplots.AxesSubplot at 0x8a13270>

12. What is relationship to company? And what are the most common relationships?


In [145]:
print("The most common relationships are:")
df['relationshiptocompany'].value_counts().head()


The most common relationships are:
Out[145]:
founder     818
relation    515
owner        79
chairman     64
investor     30
Name: relationshiptocompany, dtype: int64

In [146]:
print("Relationship to a company is describes the billionaire's relationship to the company primarily responsible for their wealth, such as founder, executive, relation, or shareholder")


Relationship to a company is describes the billionaire's relationship to the company primarily responsible for their wealth, such as founder, executive, relation, or shareholder

13.Maybe just made a graph about how wealthy they are in general?


In [151]:
columnswant


Out[151]:
name networthusbillion selfmade
0 A Jerrold Perenchio 3.0 self-made
1 A. Jerrold Perenchio 2.6 self-made
2 Abdul Al Rahman Al Jeraisy 1.5 self-made
3 Abdul Aziz Al Ghurair 1.9 inherited
4 Abdul Aziz Al-Sulaiman 1.0 self-made
5 Abdulla Al Futtaim 2.5 inherited
6 Abdulla bin Ahmad Al Ghurair 4.8 inherited
7 Abdullah Al Rajhi 2.1 self-made
8 Abdullah Al Rajhi 2.4 self-made
9 Abdulsamad Rabiu 1.2 self-made
10 Abigail Johnson 2.5 inherited
11 Abigail Johnson 9.1 inherited
12 Abigail Johnson 17.3 inherited
13 Abilio dos Santos Diniz 1.2 inherited
14 Abilio dos Santos Diniz 1.6 inherited
15 Abilio dos Santos Diniz 2.8 inherited
16 Achille Maramotti 2.1 self-made
17 Achmad Hamami 1.6 self-made
18 Adi Godrej 3.5 inherited
19 Adolf Merckle 1.0 inherited
20 Adolf Merckle 2.1 inherited
21 Adrian and John Swire 2.2 inherited
22 Adrian Swire 2.1 inherited
23 Aerin Lauder Zinterhofer 1.1 inherited
24 Ahmed Ali Kanoo 1.0 inherited
25 Ahmet Calik 1.1 self-made
26 Ahmet Nazif Zorlu 1.2 self-made
27 Ahsen Ozokur 1.6 inherited
28 Airat Shaimiev 1.1 self-made
29 Ajay Kalsi 1.9 self-made
... ... ... ...
2584 Yuri Milner 1.8 self-made
2585 Yuriy Kosiuk 1.5 self-made
2586 Yusaku Maezawa 1.3 self-made
2587 Yusuf Hamied 1.1 inherited
2588 Yvonne Bauer 3.5 inherited
2589 Zadik Bino 1.1 self-made
2590 Zarakh Iliev 3.6 self-made
2591 Zdenek Bakala 1.0 self-made
2592 Zelimkhan Mutsoev 1.3 self-made
2593 Zhang Changhong 1.5 self-made
2594 Zhang Guiping 1.1 self-made
2595 Zhang Hongwei 1.7 self-made
2596 Zhang Jindong 3.7 self-made
2597 Zhang Li 2.1 self-made
2598 Zhang Shiping 3.6 self-made
2599 Zhang Xin 3.7 self-made
2600 Zhang Zhidong 4.8 self-made
2601 Zhang Zhirong 1.8 self-made
2602 Zhang Zhongneng 1.2 self-made
2603 Zhong Sheng Jian 1.2 self-made
2604 Zhou Chengjian 1.6 self-made
2605 Zhou Hongyi 2.1 self-made
2606 Zhu Gongshan 2.1 self-made
2607 Zhu Wenchen 1.0 self-made
2608 Zhu Xingliang 1.8 self-made
2609 Zhu Yicai 1.5 self-made
2610 Ziyad Manasir 2.8 self-made
2611 Ziyaudin Magomedov 1.2 self-made
2612 Zong Qinghou 11.6 self-made
2613 Zygmunt Solorz-Zak 3.5 self-made

2614 rows × 3 columns


In [158]:
sort_df = df.sort_values('networthusbillion')

In [159]:
sort_df.plot(kind='line', x='rank', y='networthusbillion')


Out[159]:
<matplotlib.axes._subplots.AxesSubplot at 0xa68f630>

In [161]:
df.plot(kind='bar', x='name', y='networthusbillion')


Out[161]:
<matplotlib.axes._subplots.AxesSubplot at 0xa31c630>

14.Maybe plot their net worth vs age (scatterplot)


In [162]:
df.plot(kind='scatter', x='age', y='networthusbillion')


Out[162]:
<matplotlib.axes._subplots.AxesSubplot at 0xd715ed0>

15.Make a bar graph of the top 10 or 20 richest


In [163]:
df['networthusbillion'].head(10).plot(kind='bar', x='name', y='networthusbillion')


Out[163]:
<matplotlib.axes._subplots.AxesSubplot at 0xe267890>

In [ ]: