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

single

bookChallenge: Team Leaders Table

Scorri per mostrare il menu

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

Compito

Scorri per iniziare a programmare

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.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 5
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

some-alt