0% found this document useful (0 votes)
3 views2 pages

137 Vsec 6

data exploratory
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

137 Vsec 6

data exploratory
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ASSIGNMENT NO.

NAME : Wavhal Prathmesh Navnath CLASS : SY-B ROLL NO : 2317137

In [5]: import pandas as pd

In [6]: import numpy as np

In [7]: import seaborn as sns

In [8]: import matplotlib.pyplot as plt

In [9]: df=sns.load_dataset("iris")
print(df)

sepal_length sepal_width petal_length petal_width species


0 5.1 3.5 1.4 0.2 setosa
1 4.9 3.0 1.4 0.2 setosa
2 4.7 3.2 1.3 0.2 setosa
3 4.6 3.1 1.5 0.2 setosa
4 5.0 3.6 1.4 0.2 setosa
.. ... ... ... ... ...
145 6.7 3.0 5.2 2.3 virginica
146 6.3 2.5 5.0 1.9 virginica
147 6.5 3.0 5.2 2.0 virginica
148 6.2 3.4 5.4 2.3 virginica
149 5.9 3.0 5.1 1.8 virginica

[150 rows x 5 columns]

In [10]: df.value_counts()
print(df)

sepal_length sepal_width petal_length petal_width species


0 5.1 3.5 1.4 0.2 setosa
1 4.9 3.0 1.4 0.2 setosa
2 4.7 3.2 1.3 0.2 setosa
3 4.6 3.1 1.5 0.2 setosa
4 5.0 3.6 1.4 0.2 setosa
.. ... ... ... ... ...
145 6.7 3.0 5.2 2.3 virginica
146 6.3 2.5 5.0 1.9 virginica
147 6.5 3.0 5.2 2.0 virginica
148 6.2 3.4 5.4 2.3 virginica
149 5.9 3.0 5.1 1.8 virginica

[150 rows x 5 columns]

In [11]: df.hist(bins=10,figsize=(10,8),color='red',edgecolor='black')

Out[11]: array([[<Axes: title={'center': 'sepal_length'}>,


<Axes: title={'center': 'sepal_width'}>],
[<Axes: title={'center': 'petal_length'}>,
<Axes: title={'center': 'petal_width'}>]], dtype=object)
sepal_length sepal_width

· 1-
I
25+---+----+---=· -1--+-------+--------- - ,IL-----------+-----+ ---- ,,
■I
-,+--t------t -------------- +-i 35
30 -1-1-------t ------- ''

20

15 20+----<f----

15 +--if----

10+--,f----
5
5

0 0
4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 2.0 2.5 3.0 3.5 4.0 4.5

petal_length petal_width
40
35
35
30
30
25
25
20
20
15
15
10 10
5 5

0
1 2 3 4 5 6 7 0.5 1.0 1.5 2.0 2.5

You might also like