Using the heights_weights_genders.csv, analyze the difference between the height weight correlation in women and men.


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

In [2]:
df = pd.read_csv("heights_weights_genders.csv")

In [3]:
df.head()


Out[3]:
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 [9]:
male_df = df[df['Gender']=='Male']
graph_male = male_df.plot(kind='scatter',y='Weight',x='Height')



In [10]:
male_df.corr()


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

In [11]:
female_df = df[df['Gender']=='Female']
female_df.plot(kind='scatter',y='Weight',x='Height')


Out[11]:
<matplotlib.axes._subplots.AxesSubplot at 0x919ebe0>

In [12]:
female_df.corr()


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

In [ ]: