1## Descriptive Statistics for classifying irises by petal size2print('Classification Guide:')3for species in petal_df.species.unique():4 length_avg = petal_df[petal_df['species'] == species]['petal_length'].mean()5 width_avg= petal_df[petal_df['species'] == species]['petal_width'].mean()6 print(f'{species} irises have petals with an average length of {length_avg:.1f} cm and an average width of {width_avg:.1f} cm')
1Classification Guide:2setosa irises have petals with an average length of 1.5 cm and an average width of 0.2 cm3versicolor irises have petals with an average length of 4.3 cm and an average width of 1.3 cm4virginica irises have petals with an average length of 5.6 cm and an average width of 2.0 cm