Write a Python program to get observations of each species (setosa, versicolor, virginica) from iris data.
import pandas as pd data = pd.read_csv("iris.csv") print("Observations of each species:") print(data['Species'].value_counts())
Sample Output:
Observations of each species: Iris-versicolor 50 Iris-virginica 50 Iris-setosa 50 Name: Species, dtype: int64
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer