Data analysis labexercise

Petals longer than 1.5 cm

Use a boolean mask on the Iris petal-length column.

Preparing NumPy, Pandas, and MatplotlibShift+Enter runs the cell you are in.

Iris

iris.csv · Public domain

150 iris flowers, four measurements, and a species label. A small numeric table for arrays and histograms.

Loading the first rows…

From iris.csv, take petal_length as an array. Print how many flowers have a petal longer than 1.5 cm, and print those lengths.

1

Starter

2

Scratch