Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Team Leaders Table | Team Performance Analysis
Python for Coaches
Section 2. Chapitre 5
single

single

bookChallenge: Team Leaders Table

Glissez pour afficher le menu

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

Tâche

Glissez pour commencer à coder

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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 5
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt