import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

df = pd.read_csv('https://raw.githubusercontent.com/grbruns/cst383/master/1994-census-summary.csv')

# 4 use pandas to give quick summary
df.describe()

# 5 drop columns usid and fnlwgt
df.drop(columns=['usid', 'fnlwgt'])

# 6 use pandas to show first rows
df.head(3)

# 7 
df['education_num'].describe()
df['education_num'].hist()
plt.xlabel('years of education');

# 8
df['education_num'].value_counts().plot.bar()
plt.xlabel('years of education');

# 9
df['capital_gain'].plot.density()
plt.xlabel('capital gain');

# 10
sns.kdeplot(df['capital_gain'], bw_method=0.5)
plt.xlabel('capital gain');