0% found this document useful (0 votes)
53 views

Iris - Ipynb - Colab

Iris
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Iris - Ipynb - Colab

Iris
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

07/08/2024, 11:20 iris.

ipynb - Colab

pen_spark Generate randomly select 5 items from a list search Close


Iris.csv close KeyError
more_horiz
1 to 10 of 150 entries Filter
Id SepalLengthCm SepalWidthCm PetalLength
Waiting…
1 5.1 3.5 1.4

import pandas as pd
2 4.9 3.0 1.4
iris=pd.read_csv('/content/Iris.csv')
subset=iris[iris['Species']==' Iris-setosa']
3 4.7 3.2 1.3
print("Subset of iris dataset(Species='Iris-setosa):")
print(subset)
4 4.6 3.1 1.5
aggregate_result=subset.aggregate({'SepalLengthCm':['min','max','mean']
print("\nAggregate result for the subset:")
5 5.0 3.6 1.4
print(aggregate_result)
6 5.4 3.9 1.7
Subset of iris dataset(Species='Iris-setosa):
Empty DataFrame
Columns: [Id, SepalLengthCm, SepalWidthCm, PetalLengthCm, PetalWid 7 4.6 3.4 1.4
Index: []
8 5.0 3.4 1.5
Aggregate result for the subset:
SepalLengthCm SepalWidthCm 9 4.4 2.9 1.4
min NaN NaN
max NaN NaN 10 4.9 3.1 1.5
mean NaN NaN

Show 10 per page 1 2 10 15

Double-click (or enter) to edit

Double-click (or enter) to edit

https://colab.research.google.com/drive/15SxjejMQMKAfOJYbg32IlNtDPxZC1w5Y#scrollTo=fHRuUyOIWVfr 1/1

You might also like