In [25]:
import pandas as pd
%matplotlib inline


df = pd.read_csv("data/heights_weights_genders.csv")

In [26]:
df.head()


Out[26]:
Gender Height Weight
0 Male 73.847017 241.893563
1 Male 68.781904 162.310473
2 Male 74.110105 212.740856
3 Male 71.730978 220.042470
4 Male 69.881796 206.349801

In [27]:
maledf = df[(df['Gender'] == 'Male')]

In [28]:
femaledf = df[(df['Gender'] == 'Female')]

In [30]:
maledf.corr()


Out[30]:
Height Weight
Height 1.000000 0.862979
Weight 0.862979 1.000000

In [31]:
maledf.plot(kind='scatter',y='Weight',x='Height')


Out[31]:
<matplotlib.axes._subplots.AxesSubplot at 0x27a57d18588>

In [32]:
femaledf.corr()


Out[32]:
Height Weight
Height 1.000000 0.849609
Weight 0.849609 1.000000

In [33]:
femaledf.plot(kind='scatter',y='Weight',x='Height')


Out[33]:
<matplotlib.axes._subplots.AxesSubplot at 0x27a57d346d8>

In [ ]: