Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import pandas fileurl = 'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data' names = ['sepal_length','sepal_width','petal_length','petal_width','class'] data = pandas.read_csv(fileurl, names=names) #Print the class distribution class_counts = data.groupby('class').size() print(class_counts)
class
Iris-setosa
50
Iris-versicolor
50
Iris-virginica
50
dtype: int64