MulaiMulai sekarang secara gratis

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 season

  • matchups_2018: teams playing in each game for the 2018 season

  • conditions_2017: locations and weather of each game for the 2017 season

  • conditions_2018: locations and weather of each game for the 2018 season

Latihan ini adalah bagian dari kursus

Pandas Joins for Spreadsheet Users

Lihat Kursus

Petunjuk latihan

  • Combine the match-up data.
  • Combine the game conditions data.
  • Create one game-level data frame based on the newly combined data frames.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Combine match-up data
matchups = ____([____, ____])

# Combine game conditions data
conditions = ____([____, ____])

# Combine game-level data frame
games = matchups.merge(____, how=____, on=____)
Edit dan Jalankan Kode