LoslegenKostenlos loslegen

Replay that last move!

Amazing! You were able to pivot all columns of fifa_players. You saw that the overall and attacking scores are different and decided to extend your analysis to more players. However, you found an error.

You suspect that there are different scores for the same index and column values. You remember that using the .pivot() method for all the columns does not work in that case.

First, you decide to delete the problematic row so you can reshape the DataFrame afterwards.

The fifa_players dataset is available for you. Make sure you examine the dataset into the console and notice the repeated rows.

Diese Übung ist Teil des Kurses

Reshaping Data with pandas

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Drop the fifth row to delete all repeated rows
fifa_no_rep = fifa_players.____(____, ____)

# Print fifa_pivot
print(fifa_no_rep)
Code bearbeiten und ausführen