Using the heights_weights_genders.csv, analyze the difference between the height weight correlation in women and men.
In [87]:
import pandas as pd
%matplotlib inline
In [88]:
df = pd.read_csv("heights_weights_genders.csv")
In [89]:
df
Out[89]:
In [90]:
df.head()
Out[90]:
In [91]:
male_df = df[(df['Gender'] == 'Male')].describe()
male_df
Out[91]:
In [92]:
male_df.describe()
Out[92]:
In [93]:
male_df.quantile(q=0.25)
Out[93]:
In [94]:
male_df.quantile(q=0.5)
Out[94]:
In [95]:
male_df.quantile(q=0.75)
Out[95]:
In [96]:
male_iqr = male_df.quantile(q=0.75) - male_df.quantile(q=0.25)
male_iqr
Out[96]:
In [97]:
male_df.quantile(q=0.75) + (iqr*1.5)
Out[97]:
In [98]:
male_df.quantile(q=0.25) - (iqr*1.5)
Out[98]:
In [99]:
male_df.std()
Out[99]:
In [112]:
male_df.plot(kind='scatter', y='Height', x='Weight')
Out[112]:
In [100]:
female_df = df[(df['Gender'] == 'Female')]
female_df
Out[100]:
In [114]:
female_df.describe()
Out[114]:
In [115]:
female_df.median()
Out[115]:
In [116]:
female_df.quantile(q=0.25)
Out[116]:
In [117]:
female_df.quantile(q=0.5)
Out[117]:
In [118]:
female_df.quantile(q=0.75)
Out[118]:
In [119]:
female_iqr = female_df.quantile(q=0.75) - female_df.quantile(q=0.25)
female_iqr
Out[119]:
In [120]:
female_df.quantile(q=0.75) + (iqr*1.5)
Out[120]:
In [121]:
female_df.quantile(q=0.25) - (iqr*1.5)
Out[121]:
In [122]:
female_df.std()
Out[122]:
In [123]:
female_df.corr()
Out[123]:
In [124]:
female_df.plot(kind='scatter', y='Height', x='Weight')
Out[124]:
In [ ]: