The correct code to display the number of runners from each country is:
race["country"].value_counts()
This will provide a count of the occurrences of each country in the dataset.
A table with the results for 10 men in a 100-meter sprint including their place, name, country, and time, including:
1 Kim Collins SKN 10.01
2 Leonard Scott USA 10.10
3 Michael Frater JAM 10.11
4 Jason Gardener UK 10.12
5 Marlon Devonish UK 10.13
6 Darrel Brown TRI 10.14
7 Marc Burns TRI 10.15
8 Ainsley Waugh JAM 10.31
9 Daniel Plummer UK 10.46
DQ Maurice Greene USA DQ
Source: Oxford Designers & Illustrators Ltd. Pearson Education Ltd
Consider the relation race. Which code would display the number of runners from each country?
(1 point)
Responses
country.value_counts()
country.value_counts()
race.value_counts()
race.value_counts()
race["country"].info()
race["country"].info()
race["country"].value_counts()
race["country"].value_counts()
1 answer
The correct code to display the number of runners from each country is:
race["country"].value_counts()
This will provide a count of the occurrences of each country in the dataset.