Get startedGet started for free

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.

This exercise is part of the course

Pandas Joins for Spreadsheet Users

View Course

Exercise instructions

  • 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.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# 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()
Edit and Run Code