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.
Cet exercice fait partie du cours
Pandas Joins for Spreadsheet Users
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.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de 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()