Python for Data · Unit 8

Unit 8: Combining Tables

Join two pandas tables on a shared column and reshape the result.

  • 2–3 hrs
  • Intermediate
  • 6 lessons

Lessons

  1. Stacking Tables with concatTwo tables of the same shape, one after the other. 20–25 min
  2. Merging on a KeyBringing two tables together on the column they share. 20–25 min
  3. When a Merge Goes WrongDuplicate keys multiply rows, and ids written two ways match nothing. 20–25 min
  4. Wide to Long with meltTurning a column per month into a column that says which month. 20–25 min
  5. Long to Wide with pivotThe other direction, for when a person should be one row. 20–25 min
  6. Putting a Join to WorkTwo files, one question, and the checks that keep the answer honest. 20–25 min
  7. End of unit test

    Ten multiple choice questions and one free response problem. You need 70 to finish the unit. Retakes are unlimited and your best score is the one that counts.

    Take the Unit 8 test