A2 60 Rohit Jakkam EDA of Iris - Ipynb - Colaboratory
A2 60 Rohit Jakkam EDA of Iris - Ipynb - Colaboratory
ipynb - Colaboratory
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import load_iris
Dataset = load_iris()
df= pd.DataFrame(Dataset.data,columns=Dataset.feature_names)
df.head()
sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 150 entries, 0 to 149
Data columns (total 4 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 sepal length (cm) 150 non-null float64
1 sepal width (cm) 150 non-null float64
2 petal length (cm) 150 non-null float64
3 petal width (cm) 150 non-null float64
dtypes: float64(4)
memory usage: 4.8 KB
df.corr()
sepal length
1.000000 -0.117570 0.871754 0.817941
(cm)
sepal width
-0.117570 1.000000 -0.428440 -0.366126
(cm)
petal length
0 871754 0 428440 1 000000 0 962865
df.isnull()
sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)
df.describe()
https://colab.research.google.com/drive/1UKDMtRN84jp7HFFcfANIT_6WS1d3f4xN#scrollTo=onyvFnsZWKea&printMode=true 1/5
8/17/23, 1:07 PM A2_60_Rohit_Jakkam_EDA of Iris.ipynb - Colaboratory
sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)
(150, 4)
df.size
600
sns.pairplot(df)
<seaborn.axisgrid.PairGrid at 0x7c556469f2e0>
sns.heatmap(df,cbar=True,cmap='viridis')
https://colab.research.google.com/drive/1UKDMtRN84jp7HFFcfANIT_6WS1d3f4xN#scrollTo=onyvFnsZWKea&printMode=true 2/5
8/17/23, 1:07 PM A2_60_Rohit_Jakkam_EDA of Iris.ipynb - Colaboratory
<Axes: >
sns.heatmap(df.isnull())
<Axes: >
sns.set_style('whitegrid')
sns.countplot(x='sepal length (cm)',data =df)
https://colab.research.google.com/drive/1UKDMtRN84jp7HFFcfANIT_6WS1d3f4xN#scrollTo=onyvFnsZWKea&printMode=true 3/5
8/17/23, 1:07 PM A2_60_Rohit_Jakkam_EDA of Iris.ipynb - Colaboratory
array([5.1, 4.9, 4.7, 4.6, 5. , 5.4, 4.4, 4.8, 4.3, 5.8, 5.7, 5.2, 5.5,
4.5, 5.3, 7. , 6.4, 6.9, 6.5, 6.3, 6.6, 5.9, 6. , 6.1, 5.6, 6.7,
6.2, 6.8, 7.1, 7.6, 7.3, 7.2, 7.7, 7.4, 7.9])
array([3.5, 3. , 3.2, 3.1, 3.6, 3.9, 3.4, 2.9, 3.7, 4. , 4.4, 3.8, 3.3,
4.1, 4.2, 2.3, 2.8, 2.4, 2.7, 2. , 2.2, 2.5, 2.6])
<Axes: >
https://colab.research.google.com/drive/1UKDMtRN84jp7HFFcfANIT_6WS1d3f4xN#scrollTo=onyvFnsZWKea&printMode=true 4/5
8/17/23, 1:07 PM A2_60_Rohit_Jakkam_EDA of Iris.ipynb - Colaboratory
https://colab.research.google.com/drive/1UKDMtRN84jp7HFFcfANIT_6WS1d3f4xN#scrollTo=onyvFnsZWKea&printMode=true 5/5