Using the heights_weights_genders.csv, analyze the difference between the height weight correlation in women and men.
In [1]:
import pandas as pd
import matplotlib
%matplotlib inline
In [2]:
df = pd.read_csv('data/heights_weights_genders.csv')
In [3]:
df.head()
Out[3]:
In [4]:
df[df['Gender'] == 'Male'].corr()
Out[4]:
In [10]:
ax = df[df['Gender'] == 'Male'].plot(kind = 'scatter', x = 'Weight', y = 'Height')
ax.set_ylim((50, 85))
ax.set_xlim((40, 280))
Out[10]:
In [5]:
df[df['Gender'] == 'Female'].corr()
Out[5]:
In [11]:
ax = df[df['Gender'] == 'Female'].plot(kind = 'scatter', x = 'Weight', y = 'Height')
ax.set_ylim((50, 85))
ax.set_xlim((40, 280))
Out[11]:
In [ ]: