Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Team Leaders Table | Team Performance Analysis
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Coaches

bookChallenge: Team Leaders Table

Coaches often want to quickly identify team leaders in key statistics. Use pandas to automate this process.

Taak

Swipe to start coding

Write a function that takes a DataFrame with columns 'athlete', 'goals', and 'assists' and returns a new DataFrame containing only the athletes who have the highest number of goals or assists.

  • Find the maximum value in the 'goals' column.
  • Find the maximum value in the 'assists' column.
  • Select all rows where the value in 'goals' equals the maximum goals or the value in 'assists' equals the maximum assists.
  • Return a DataFrame with only these rows.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 5
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

bookChallenge: Team Leaders Table

Veeg om het menu te tonen

Coaches often want to quickly identify team leaders in key statistics. Use pandas to automate this process.

Taak

Swipe to start coding

Write a function that takes a DataFrame with columns 'athlete', 'goals', and 'assists' and returns a new DataFrame containing only the athletes who have the highest number of goals or assists.

  • Find the maximum value in the 'goals' column.
  • Find the maximum value in the 'assists' column.
  • Select all rows where the value in 'goals' equals the maximum goals or the value in 'assists' equals the maximum assists.
  • Return a DataFrame with only these rows.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 5
single

single

some-alt