1. Learn
  2. /
  3. Courses
  4. /
  5. Tidy Data in Python Mini-Course

Exercise

Deal with it!

In the previous exercise, the three columns--Black, Blue, and Brown--represent the same variable: eye color. It would make much more sense to merge them into one column. Use melt to do it!

Instructions

100 XP
  • Use melt to leave Name and Wear_Glasses intact and combine everything else.
  • Rename the variable column to Eye_Color.
  • Hit "Submit Answer" to print out the resulting dataframe.