1. Learn
  2. /
  3. Courses
  4. /
  5. Pandas Joins for Spreadsheet Users

Exercise

Concatenating rows

You and the team are ready to continue the project to reduce player concussions in the NFL. Previously you looked at game data from the 2016 and 2017 seasons and determined that the data should be joined. Among other things, it will help you to compare the number of games for each season by season type.

Games spreadsheet

Data from both seasons have been loaded into two data frames, games_2016 and games_2017. Please assume for this exercise and all remaining exercises, that pandas has been imported as pd.

Instructions

100 XP
  • View each data frame to refresh your memory.
  • Concatenate the data frames by consecutive season.
  • Cross-tabulate Season and SeasonType with pd.crosstab().