Question
Can help how to write Python code to answer those questions? 1. In below two datasets Athletes (contains details about the participating Athletes) and Coaches
Can help how to write Python code to answer those questions?
1. In below two datasets "Athletes" (contains details about the participating Athletes) and "Coaches" (details about coaches, countries and disciplines along with event), how many athletics (Discipline = "Athletics") where the NOC of athletics and coaches are different.
Data Set: Athletes
Name | NOC | Discipline |
AALERUD Katrine | Norway | Cycling Road |
ABAD Nestor | Spain | Artistic Gymnastics |
ABAGNALE Giovanni | Italy | Rowing |
ABALDE Alberto | Spain | Basketball |
ABALDE Tamara | Spain | Basketball |
ABALO Luc | France | Handball |
ABAROA Cesar | Chile | Rowing |
ABASS Abobakr | Sudan | Swimming |
ABBASALI Hamideh | Islamic Republic of Iran | Karate |
ABBASOV Islam | Azerbaijan | Wrestling |
ABBINGH Lois | Netherlands | Handball |
ABBOT Emily | Australia | Rhythmic Gymnastics |
ABBOTT Monica | United States of America | Baseball/Softball |
ABDALLA Abubaker Haydar | Qatar | Athletics |
ABDALLA Maryam | Egypt | Artistic Swimming |
ABDALLAH Shahd | Egypt | Artistic Swimming |
ABDALRASOOL Mohamed | Sudan | Judo |
ABDEL LATIF Radwa | Egypt | Shooting |
ABDEL RAZEK Samy | Egypt | Shooting |
Data Set: Coaches
Name | NOC | Discipline |
ABDELMAGID Wael | Egypt | Football |
ABE Junya | Japan | Volleyball |
ABE Katsuhiko | Japan | Basketball |
ADAMA Cherif | Cte d'Ivoire | Football |
AGEBA Yuya | Japan | Volleyball |
AIKMAN Siegfried Gottlieb | Japan | Hockey |
AL SAADI Kais | Germany | Hockey |
ALAMEDA Lonni | Canada | Baseball/Softball |
ALEKNO Vladimir | Islamic Republic of Iran | Volleyball |
ALEKSEEV Alexey | ROC | Handball |
ALLER CARBALLO Manuel Angel | Spain | Basketball |
ALSHEHRI Saad | Saudi Arabia | Football |
ALY Kamal | Egypt | Football |
AMAYA GAITAN Fabian | Puerto Rico | Basketball |
AMO AGUADO Pablo | Spain | Football |
ANDONOVSKI Vlatko | United States of America | Football |
ANNAN Alyson | Netherlands | Hockey |
ARNAU CREUS Xavier | Japan | Hockey |
ARNOLD Graham | Australia | Football |
2. In below data set "EntriesGender" (details about the Discipline and the number of females and males participating), please find the top 5 disciplines having highest proportions of females.
Data Set: EntriesGende
Discipline | Female | Male | Total |
3x3 Basketball | 32 | 32 | 64 |
Archery | 64 | 64 | 128 |
Artistic Gymnastics | 98 | 98 | 196 |
Artistic Swimming | 105 | 0 | 105 |
Athletics | 969 | 1072 | 2041 |
Badminton | 86 | 87 | 173 |
Baseball/Softball | 90 | 144 | 234 |
Basketball | 144 | 144 | 288 |
Beach Volleyball | 48 | 48 | 96 |
Boxing | 102 | 187 | 289 |
Canoe Slalom | 41 | 41 | 82 |
Canoe Sprint | 123 | 126 | 249 |
Cycling BMX Freestyle | 10 | 9 | 19 |
Cycling BMX Racing | 24 | 24 | 48 |
Cycling Mountain Bike | 38 | 38 | 76 |
Cycling Road | 70 | 131 | 201 |
Cycling Track | 90 | 99 | 189 |
Diving | 72 | 71 | 143 |
Equestrian | 73 | 125 | 198 |
3. In below data set "Medals" (contains the Medals and Scoreboard of countries that participated in Tokyo Olympics), please draw a stacked bar chart, medals no. against countries, having appropriate colors for various medal types, ordering countries by rank in the dataset. Show top 30 countries only.
Data Set: Medals
Rank | Team/NOC | Gold | Silver | Bronze | Total | Rank by Total |
1 | United States of America | 39 | 41 | 33 | 113 | 1 |
2 | People's Republic of China | 38 | 32 | 18 | 88 | 2 |
3 | Japan | 27 | 14 | 17 | 58 | 5 |
4 | Great Britain | 22 | 21 | 22 | 65 | 4 |
5 | ROC | 20 | 28 | 23 | 71 | 3 |
6 | Australia | 17 | 7 | 22 | 46 | 6 |
7 | Netherlands | 10 | 12 | 14 | 36 | 9 |
8 | France | 10 | 12 | 11 | 33 | 10 |
9 | Germany | 10 | 11 | 16 | 37 | 8 |
10 | Italy | 10 | 10 | 20 | 40 | 7 |
11 | Canada | 7 | 6 | 11 | 24 | 11 |
12 | Brazil | 7 | 6 | 8 | 21 | 12 |
13 | New Zealand | 7 | 6 | 7 | 20 | 13 |
14 | Cuba | 7 | 3 | 5 | 15 | 18 |
15 | Hungary | 6 | 7 | 7 | 20 | 13 |
16 | Republic of Korea | 6 | 4 | 10 | 20 | 13 |
17 | Poland | 4 | 5 | 5 | 14 | 19 |
18 | Czech Republic | 4 | 4 | 3 | 11 | 23 |
19 | Kenya | 4 | 4 | 2 | 10 | 25 |
20 | Norway | 4 | 2 | 2 | 8 | 29 |
21 | Jamaica | 4 | 1 | 4 | 9 | 26 |
22 | Spain | 3 | 8 | 6 | 17 | 17 |
23 | Sweden | 3 | 6 | 0 | 9 | 26 |
24 | Switzerland | 3 | 4 | 6 | 13 | 20 |
25 | Denmark | 3 | 4 | 4 | 11 | 23 |
26 | Croatia | 3 | 3 | 2 | 8 | 29 |
27 | Islamic Republic of Iran | 3 | 2 | 2 | 7 | 33 |
28 | Serbia | 3 | 1 | 5 | 9 | 26 |
29 | Belgium | 3 | 1 | 3 | 7 | 33 |
30 | Bulgaria | 3 | 1 | 2 | 6 | 39 |
31 | Slovenia | 3 | 1 | 1 | 5 | 42 |
32 | Uzbekistan | 3 | 0 | 2 | 5 | 42 |
33 | Georgia | 2 | 5 | 1 | 8 | 29 |
34 | Chinese Taipei | 2 | 4 | 6 | 12 | 22 |
35 | Turkey | 2 | 2 | 9 | 13 | 20 |
36 | Greece | 2 | 1 | 1 | 4 | 47 |
36 | Uganda | 2 | 1 | 1 | 4 | 47 |
38 | Ecuador | 2 | 1 | 0 | 3 | 60 |
39 | Ireland | 2 | 0 | 2 | 4 | 47 |
39 | Israel | 2 | 0 | 2 | 4 | 47 |
41 | Qatar | 2 | 0 | 1 | 3 | 60 |
42 | Bahamas | 2 | 0 | 0 | 2 | 66 |
42 | Kosovo | 2 | 0 | 0 | 2 | 66 |
44 | Ukraine | 1 | 6 | 12 | 19 | 16 |
45 | Belarus | 1 | 3 | 3 | 7 | 33 |
46 | Romania | 1 | 3 | 0 | 4 | 47 |
46 | Venezuela | 1 | 3 | 0 | 4 | 47 |
48 | India | 1 | 2 | 4 | 7 | 33 |
49 | Hong Kong, China | 1 | 2 | 3 | 6 | 39 |
50 | Philippines | 1 | 2 | 1 | 4 | 47 |
50 | Slovakia | 1 | 2 | 1 | 4 | 47 |
52 | South Africa | 1 | 2 | 0 | 3 | 60 |
53 | Austria | 1 | 1 | 5 | 7 | 33 |
54 | Egypt | 1 | 1 | 4 | 6 | 39 |
55 | Indonesia | 1 | 1 | 3 | 5 | 42 |
56 | Ethiopia | 1 | 1 | 2 | 4 | 47 |
56 | Portugal | 1 | 1 | 2 | 4 | 47 |
58 | Tunisia | 1 | 1 | 0 | 2 | 66 |
59 | Estonia | 1 | 0 | 1 | 2 | 66 |
59 | Fiji | 1 | 0 | 1 | 2 | 66 |
59 | Latvia | 1 | 0 | 1 | 2 | 66 |
59 | Thailand | 1 | 0 | 1 | 2 | 66 |
63 | Bermuda | 1 | 0 | 0 | 1 | 77 |
63 | Morocco | 1 | 0 | 0 | 1 | 77 |
63 | Puerto Rico | 1 | 0 | 0 | 1 | 77 |
66 | Colombia | 0 | 4 | 1 | 5 | 42 |
67 | Azerbaijan | 0 | 3 | 4 | 7 | 33 |
68 | Dominican Republic | 0 | 3 | 2 | 5 | 42 |
69 | Armenia | 0 | 2 | 2 | 4 | 47 |
70 | Kyrgyzstan | 0 | 2 | 1 | 3 | 60 |
71 | Mongolia | 0 | 1 | 3 | 4 | 47 |
72 | Argentina | 0 | 1 | 2 | 3 | 60 |
72 | San Marino | 0 | 1 | 2 | 3 | 60 |
74 | Jordan | 0 | 1 | 1 | 2 | 66 |
74 | Malaysia | 0 | 1 | 1 | 2 | 66 |
74 | Nigeria | 0 | 1 | 1 | 2 | 66 |
77 | Bahrain | 0 | 1 | 0 | 1 | 77 |
77 | Saudi Arabia | 0 | 1 | 0 | 1 | 77 |
77 | Lithuania | 0 | 1 | 0 | 1 | 77 |
77 | North Macedonia | 0 | 1 | 0 | 1 | 77 |
77 | Namibia | 0 | 1 | 0 | 1 | 77 |
77 | Turkmenistan | 0 | 1 | 0 | 1 | 77 |
83 | Kazakhstan | 0 | 0 | 8 | 8 | 29 |
84 | Mexico | 0 | 0 | 4 | 4 | 47 |
85 | Finland | 0 | 0 | 2 | 2 | 66 |
86 | Botswana | 0 | 0 | 1 | 1 | 77 |
86 | Burkina Faso | 0 | 0 | 1 | 1 | 77 |
86 | Cte d'Ivoire | 0 | 0 | 1 | 1 | 77 |
86 | Ghana | 0 | 0 | 1 | 1 | 77 |
86 | Grenada | 0 | 0 | 1 | 1 | 77 |
86 | Kuwait | 0 | 0 | 1 | 1 | 77 |
86 | Republic of Moldova | 0 | 0 | 1 | 1 | 77 |
86 | Syrian Arab Republic | 0 | 0 | 1 | 1 | 77 |
4. In below data set "Teams" (details about the Teams, discipline, Name of Country and the event), how many countries where the names are different from NOC ? please show results with Python code.
Data Set: Teams
Name | Discipline | NOC | Event |
Belgium | 3x3 Basketball | Belgium | Men |
China | 3x3 Basketball | People's Republic of China | Men |
China | 3x3 Basketball | People's Republic of China | Women |
France | 3x3 Basketball | France | Women |
Italy | 3x3 Basketball | Italy | Women |
Japan | 3x3 Basketball | Japan | Men |
Japan | 3x3 Basketball | Japan | Women |
Latvia | 3x3 Basketball | Latvia | Men |
Mongolia | 3x3 Basketball | Mongolia | Women |
Netherlands | 3x3 Basketball | Netherlands | Men |
Poland | 3x3 Basketball | Poland | Men |
ROC | 3x3 Basketball | ROC | Men |
ROC | 3x3 Basketball | ROC | Women |
Romania | 3x3 Basketball | Romania | Women |
Serbia | 3x3 Basketball | Serbia | Men |
United States | 3x3 Basketball | United States of America | Women |
Australia | Archery | Australia | Men's Team |
Australia | Archery | Australia | Mixed Team |
Bangladesh | Archery | Bangladesh | Mixed Team |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started