Session Ready
Exercise

How is Frankenstein, Dorian Gray?

You are satisfied with the way you reshaped the books_gothic DataFrame, however, you would like to finish your work by naming the newly-created columns. This will help you clarify what the variables and values are.

You remember that .melt() allows you to do that. In order to achieve your goal, you will reshape your DataFrame in three steps.

The same books_gothic dataset you used before is available for you. It contains data about the title, author, number_pages, rating, rating_count, and publisher of each book. Make sure to examine it in the console!

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Define a new books_ratings DataFrame by melting the rating and rating_count columns using the title, authors, and publisher as identifier variables.