Iris - Ipynb - Colab
Iris - Ipynb - Colab
ipynb - Colab
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
https://colab.research.google.com/drive/15SxjejMQMKAfOJYbg32IlNtDPxZC1w5Y#scrollTo=fHRuUyOIWVfr 1/1