import matplotlib.pyplot as plt
%matplotlib inline

print(df['gender'].value_counts())

df.groupby('gender')['networthusbillion'].mean()

df.groupby('gender')['sourceofwealth'].value_counts()

"""
Explanation: What country are most billionaires from? For the top ones, how many billionaires per billion people?
Who are the top 10 richest billionaires?
What's the average wealth of a billionaire? Male? Female?
Who is the poorest billionaire? Who are the top 10 poorest billionaires?
'What is relationship to company'? And what are the most common relationships?
Most common source of wealth? Male vs. female?
Given the richest person in a country, what % of the GDP is their wealth?
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
What are the most common industries for billionaires to come from? What's the total amount of billionaire money from each industry?
How many self made billionaires vs. others?
How old are billionaires? How old are billionaires self made vs. non self made? or different industries?
Who are the youngest billionaires? The oldest? Age distribution - maybe make a graph about it?
Maybe just made a graph about how wealthy they are in general?
Maybe plot their net worth vs age (scatterplot)
Make a bar graph of the top 10 or 20 richest
How many female billionaires are there compared to male? What industries are they from? What is their average wealth?
End of explanation
"""


df.columns.values
df['countrycode'].value_counts()

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

#Who is the poorest billionaire? Top ten poorest?
df.sort_values(by='rank', ascending=False).head(2)

df[df['networthusbillion'] == 1]

df['networthusbillion'].describe()

df.groupby("gender")["networthusbillion"].describe()

#Adding the wealt of all the billionaires in a given country.
df.groupby('countrycode')['networthusbillion'].sum().sort_values(ascending=False)

#What are the most common industries for billionaires to come from?
df['industry'].value_counts()

df.groupby('industry')['networthusbillion'].sum()

young_bills = df[df['age'] < 40]
young_bills.plot(kind='barh', x='name', y='networthusbillion').sort_values()

import pandas as pd
import matplotlib.pplot as plt
plt.style.use("ggplot")
%matplot

"""
Explanation: Some examples from the review
End of explanation
"""


