Import As Import As: "Iris - CSV"
Import As Import As: "Iris - CSV"
In [1]:
import numpy as np
import pandas as pd
In [10]:
df = pd.read_csv("iris.csv")
In [11]:
df
In [12]:
column = len(list(df))
column
Out[12]: 5
In [13]:
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 150 entries, 0 to 149
Data columns (total 5 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 sepal_length 150 non-null float64
1 sepal_width 150 non-null float64
2 petal_length 150 non-null float64
3 petal_width 150 non-null float64
4 species 150 non-null object
dtypes: float64(4), object(1)
memory usage: 6.0+ KB
1 of 4 19-04-2022, 01:06 pm
Untitled http://localhost:8888/nbconvert/html/Assignment%2010/Untitled.ipynb...
In [14]:
df.describe()
In [15]:
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
In [17]:
fig, axes = plt.subplots(2, 2, figsize=(16, 8))
2 of 4 19-04-2022, 01:06 pm
Untitled http://localhost:8888/nbconvert/html/Assignment%2010/Untitled.ipynb...
3 of 4 19-04-2022, 01:06 pm
Untitled http://localhost:8888/nbconvert/html/Assignment%2010/Untitled.ipynb...
In [19]:
data_to_plot = [df["sepal_length"],df["sepal_width"],df["petal_length"],df["petal_width"
sns.set_style("whitegrid")
# Creating a figure instance
fig = plt.figure(1, figsize=(12,8))
In [ ]:
4 of 4 19-04-2022, 01:06 pm