Case study challenge - part 1
It's time to build a usable dataset from start to finish! Your team will be using this data to train a model that predicts the likelihood of a concussion on each play. The first part of your challenge is to create a dataset with new game data from the 2017 and 2018 seasons. You have four data frames loaded:
matchups_2017
: teams playing in each game for the 2017 seasonmatchups_2018
: teams playing in each game for the 2018 seasonconditions_2017
: locations and weather of each game for the 2017 seasonconditions_2018
: locations and weather of each game for the 2018 season
This exercise is part of the course
Pandas Joins for Spreadsheet Users
Exercise instructions
- Combine the match-up data.
- Combine the game conditions data.
- Create one game-level data frame based on the newly combined data frames.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Combine match-up data
matchups = ____([____, ____])
# Combine game conditions data
conditions = ____([____, ____])
# Combine game-level data frame
games = matchups.merge(____, how=____, on=____)