Professional Documents
Culture Documents
EDA QUIZ Solution
EDA QUIZ Solution
EDA QUIZ Solution
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
In [3]: df.head()
Out[3]: species island culmen length culmen depth flipper length body mass sex
In [4]: df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 333 entries, 0 to 332
Data columns (total 7 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 species 333 non-null object
1 island 333 non-null object
2 culmen length 333 non-null float64
3 culmen depth 333 non-null float64
4 flipper length 333 non-null int64
5 body mass 333 non-null int64
6 sex 333 non-null object
dtypes: float64(2), int64(2), object(3)
memory usage: 18.3+ KB
3. Which species of male Penguin has the highest average body mass?
In [8]: plt.figure(figsize=(15, 6))
sns.barplot(data=df, x='body mass', y='species', hue='sex')
plt.show()
Answer: Gentoo
sobashivaprakash@gmail.com
In [ ]:
YT24WOMVHR
4.
In [9]: plt.figure(figsize=(15, 6))
sns.barplot(data=df, x='culmen depth', y='species', hue='sex')
plt.show()
In [ ]:
In [ ]:
In [ ]:
Out[21]: <AxesSubplot:>
Flipper Length and Body Mass are strongly dependent with corelation value of 0.87
This file is meant for personal use by sobashivaprakash@gmail.com only.
In [ ]:
Sharing or publishing the contents in part or full is liable for legal action.
sobashivaprakash@gmail.com
YT24WOMVHR