1. Learn
  2. /
  3. Courses
  4. /
  5. Reshaping Data with pandas

Connected

Exercise

Dribbling the pivot method

It's time to keep working with the fifa_players dataset. After you explored the dataset, you realized the dataset contains player scores on different movements: shooting, dribbling, and passing. There are attacking scores as well as overall scores.

The goal of the project is to analyze the scores to create an optimized team, so you decide to explore which score is better. But the current data is in a long format. You'll need to to pivot your DataFrame in different ways to discover a pattern.

The fifa_players dataset is available for you. Make sure to examine it in the console!

Instructions 1/3

undefined XP
  • 1

    Pivot fifa_players to get a DataFrame with overall scores indexed by name, and identified by movement in the columns.

  • 2

    Pivot fifa_players to get a DataFrame with attacking scores indexed by name, and identified by movement in the columns.

  • 3

    Use .pivot() on fifa_players to get overall scores indexed by movement, and identified by name in the columns.