In [8]:
import pandas as pd
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib
plt.style.use('ggplot')
In [2]:
df = pd.read_csv("data/heights_weights_genders.csv")
In [3]:
df.head(2)
Out[3]:
In [13]:
fig, ax = plt.subplots(figsize=[10,6])
for category, group in df.groupby('Gender'):
ax.plot(group['Height'], group['Weight'], marker='o', linestyle='', label=category, markeredgewidth=0,alpha=0.2)
ax.legend()
Out[13]:
In [19]:
women = df[df['Gender']=='Female']
men = df[df['Gender']=='Male']
In [21]:
women.plot(kind='scatter',x='Height',y='Weight')
women.corr()
Out[21]:
In [22]:
men.plot(kind='scatter',x='Height',y='Weight')
men.corr()
Out[22]:
In [23]:
df.corr()
Out[23]:
In [ ]: