LoslegenKostenlos loslegen

Case study challenge - part 3

Concussions and other injuries are specific to individual players. In this third and final part of the Case Study Challenge, you'll add in data describing the players participating in each play. Some players may be missing from the player data for certain plays. Also, the player data covers a longer time frame and may include data from other plays.

The file players.csv contains player data. Your data frame from Part 2, games_plays, is already loaded.

Diese Übung ist Teil des Kurses

Pandas Joins for Spreadsheet Users

Kurs anzeigen

Anleitung zur Übung

  • Load the player data and list the columns of the data frame.
  • Merge player data into the data frame with games and plays. Include all rows from each data frame and capture which frame includes the row.
  • Get data frame information on the result.

Interaktive Übung

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

# Load player data and list columns
players = ____('players.csv')
print(____.columns)

# Merge data
train_df = ____.merge(players, how=____, on=[____, ____], ____=True)

# View data frame information
____.info()
Code bearbeiten und ausführen